selectFirst 跳过 disabled 的选项 (#1393)

This commit is contained in:
RickCole 2021-01-14 17:15:59 +08:00 committed by GitHub
parent 78ec5d8ebc
commit 6ab76fcaa6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -385,7 +385,7 @@ export const FormItemStore = StoreNode.named('FormItemStore')
}
for (let option of options) {
if (option[self.valueField || 'value']) {
if (option[self.valueField || 'value'] && !option.disabled) {
return option;
} else if (Array.isArray(option.children)) {
const childFirst = getFirstAvaibleOption(option.children);