fix: 修复combo内select的options使用valueField时options会被全部禁用的问题 (#10957)

Co-authored-by: jinye <jinye@baidu.com>
This commit is contained in:
lmaomaoz 2024-09-24 19:09:55 +08:00 committed by GitHub
parent 854a8be977
commit 625d36c82a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1410,14 +1410,16 @@ export const FormItemStore = StoreNode.named('FormItemStore')
group.items.forEach(item => {
if (self !== item) {
options.push(
...item.selectedOptions.map((item: any) => item && item.value)
...item.selectedOptions.map(
(item: any) => item && item[valueField]
)
);
}
});
if (filteredOptions.length && options.length) {
filteredOptions = mapTree(filteredOptions, item => {
if (~options.indexOf(item.value)) {
if (~options.indexOf(item[valueField])) {
return {
...item,
disabled: true