mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-23 17:40:23 +03:00
Ensured stats for renamed tagged are propagated to new name
This commit is contained in:
parent
dd9ee044eb
commit
1e155af948
1 changed files with 5 additions and 1 deletions
|
@ -116,8 +116,12 @@ export const tagsListReducerCreator = (
|
||||||
tags: rejectTag(tags, tag),
|
tags: rejectTag(tags, tag),
|
||||||
filteredTags: rejectTag(filteredTags, tag),
|
filteredTags: rejectTag(filteredTags, tag),
|
||||||
}));
|
}));
|
||||||
builder.addCase(tagEdited, ({ tags, filteredTags, ...rest }, { payload }) => ({
|
builder.addCase(tagEdited, ({ tags, filteredTags, stats, ...rest }, { payload }) => ({
|
||||||
...rest,
|
...rest,
|
||||||
|
stats: {
|
||||||
|
...stats,
|
||||||
|
[payload.newName]: stats[payload.oldName],
|
||||||
|
},
|
||||||
tags: tags.map(renameTag(payload.oldName, payload.newName)).sort(),
|
tags: tags.map(renameTag(payload.oldName, payload.newName)).sort(),
|
||||||
filteredTags: filteredTags.map(renameTag(payload.oldName, payload.newName)).sort(),
|
filteredTags: filteredTags.map(renameTag(payload.oldName, payload.newName)).sort(),
|
||||||
}));
|
}));
|
||||||
|
|
Loading…
Reference in a new issue