B: Fix substitution editor
This commit is contained in:
parent
f8f1ba4a62
commit
5cc7ee1353
|
@ -67,8 +67,8 @@ function DlgEditOperation({ hideWindow, oss, target, onSubmit }: DlgEditOperatio
|
|||
if (cache.loading || schemas.length !== schemasIDs.length) {
|
||||
return;
|
||||
}
|
||||
setSubstitutions(() =>
|
||||
target.substitutions.filter(sub => {
|
||||
setSubstitutions(prev =>
|
||||
prev.filter(sub => {
|
||||
const original = cache.getSchemaByCst(sub.original);
|
||||
if (!original || !schemasIDs.includes(original.id)) {
|
||||
return false;
|
||||
|
@ -80,7 +80,7 @@ function DlgEditOperation({ hideWindow, oss, target, onSubmit }: DlgEditOperatio
|
|||
return true;
|
||||
})
|
||||
);
|
||||
}, [schemasIDs, schemas, cache.loading, target.substitutions]);
|
||||
}, [schemasIDs, schemas, cache.loading]);
|
||||
|
||||
const handleSubmit = () => {
|
||||
const data: IOperationUpdateData = {
|
||||
|
|
Loading…
Reference in New Issue
Block a user