mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2024-12-23 09:30:31 +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),
|
||||
filteredTags: rejectTag(filteredTags, tag),
|
||||
}));
|
||||
builder.addCase(tagEdited, ({ tags, filteredTags, ...rest }, { payload }) => ({
|
||||
builder.addCase(tagEdited, ({ tags, filteredTags, stats, ...rest }, { payload }) => ({
|
||||
...rest,
|
||||
stats: {
|
||||
...stats,
|
||||
[payload.newName]: stats[payload.oldName],
|
||||
},
|
||||
tags: tags.map(renameTag(payload.oldName, payload.newName)).sort(),
|
||||
filteredTags: filteredTags.map(renameTag(payload.oldName, payload.newName)).sort(),
|
||||
}));
|
||||
|
|
Loading…
Reference in a new issue