Merge pull request #3653 from SillyTavern/fix-group-create-tags Fix group creation inheriting tags from characters[0]
Signed| @@ -1251,7 +1251,7 @@ function onCharacterCreateClick() { | ||
| 1251 | 1251 | } |
| 1252 | 1252 | |
| 1253 | 1253 | function onGroupCreateClick() { |
| 1254 | - // Nothing to do here at the moment. Tags in group interface get automatically redrawn. | |
| 1254 | + $('#groupTagList').empty(); | |
| 1255 | 1255 | } |
| 1256 | 1256 | |
| 1257 | 1257 | export function applyTagsOnCharacterSelect(chid = null) { |
| @@ -1259,11 +1259,11 @@ export function applyTagsOnCharacterSelect(chid = null) { | ||
| 1259 | 1259 | if (menu_type === 'create') { |
| 1260 | 1260 | const currentTagIds = $('#tagList').find('.tag').map((_, el) => $(el).attr('id')).get(); |
| 1261 | 1261 | const currentTags = tags.filter(x => currentTagIds.includes(x.id)); |
| 1262 | 1262 | printTagList($('#tagList'), { forEntityOrKey: nullundefined, tags: currentTags, tagOptions: { removable: true } }); |
| 1263 | 1263 | return; |
| 1264 | 1264 | } |
| 1265 | 1265 | |
| 1266 | 1266 | chid = chid ?? (this_chid !== undefined ? Number(this_chid) : undefined); |
| 1267 | 1267 | printTagList($('#tagList'), { forEntityOrKey: chid, tagOptions: { removable: true } }); |
| 1268 | 1268 | } |
| 1269 | 1269 | |
| @@ -1272,11 +1272,11 @@ export function applyTagsOnGroupSelect(groupId = null) { | ||
| 1272 | 1272 | if (menu_type === 'group_create') { |
| 1273 | 1273 | const currentTagIds = $('#groupTagList').find('.tag').map((_, el) => $(el).attr('id')).get(); |
| 1274 | 1274 | const currentTags = tags.filter(x => currentTagIds.includes(x.id)); |
| 1275 | 1275 | printTagList($('#groupTagList'), { forEntityOrKey: nullundefined, tags: currentTags, tagOptions: { removable: true } }); |
| 1276 | 1276 | return; |
| 1277 | 1277 | } |
| 1278 | 1278 | |
| 1279 | 1279 | groupId = groupId ?? (selected_group ? Number(selected_group) : undefined); |
| 1280 | 1280 | printTagList($('#groupTagList'), { forEntityOrKey: groupId, tagOptions: { removable: true } }); |
| 1281 | 1281 | } |
| 1282 | 1282 | |