B: Fix selection after substitutions
This commit is contained in:
parent
5b109689e4
commit
b882508d4b
|
@ -289,9 +289,12 @@ export const RSEditState = ({
|
||||||
|
|
||||||
const handleSubstituteCst = useCallback(
|
const handleSubstituteCst = useCallback(
|
||||||
(data: ICstSubstituteData) => {
|
(data: ICstSubstituteData) => {
|
||||||
model.cstSubstitute(data, () => toast.success(information.substituteSingle));
|
model.cstSubstitute(data, () => {
|
||||||
|
setSelected(prev => prev.filter(id => !data.substitutions.find(sub => sub.original === id)));
|
||||||
|
toast.success(information.substituteSingle);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
[model]
|
[model, setSelected]
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleDeleteCst = useCallback(
|
const handleDeleteCst = useCallback(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user