mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 21:10:38 +03:00
B: Fix selection after substitutions
This commit is contained in:
parent
c5c6c42007
commit
40d3d0c28d
|
@ -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