fix: 修复 crud 点选出现无线循环的问题 Close: #8523 (#8524)

This commit is contained in:
liaoxuezhi 2023-10-27 11:54:02 +08:00 committed by GitHub
parent 5a236263fc
commit 80fcdbb5ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1254,10 +1254,15 @@ export const FormItemStore = StoreNode.named('FormItemStore')
});
if (filteredOptions.length) {
filteredOptions = mapTree(filteredOptions, item => ({
...item,
disabled: ~options.indexOf(item.value)
}));
filteredOptions = mapTree(filteredOptions, item => {
if (~options.indexOf(item.value)) {
return {
...item,
disabled: true
};
}
return item;
});
}
}