B: Fix substitution editor
Some checks are pending
Frontend CI / build (22.x) (push) Waiting to run

This commit is contained in:
Ivan 2024-08-19 12:33:04 +03:00
parent 2470fe1fae
commit 3d80947af5

View File

@ -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 = {