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) {
|
if (cache.loading || schemas.length !== schemasIDs.length) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setSubstitutions(() =>
|
setSubstitutions(prev =>
|
||||||
target.substitutions.filter(sub => {
|
prev.filter(sub => {
|
||||||
const original = cache.getSchemaByCst(sub.original);
|
const original = cache.getSchemaByCst(sub.original);
|
||||||
if (!original || !schemasIDs.includes(original.id)) {
|
if (!original || !schemasIDs.includes(original.id)) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -80,7 +80,7 @@ function DlgEditOperation({ hideWindow, oss, target, onSubmit }: DlgEditOperatio
|
||||||
return true;
|
return true;
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}, [schemasIDs, schemas, cache.loading, target.substitutions]);
|
}, [schemasIDs, schemas, cache.loading]);
|
||||||
|
|
||||||
const handleSubmit = () => {
|
const handleSubmit = () => {
|
||||||
const data: IOperationUpdateData = {
|
const data: IOperationUpdateData = {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user