fix: 修复 select 同时配置 source 和 options 时,页面切换选项有可能被重置为 options 而不是 source 加载部分 (#9194)

This commit is contained in:
liaoxuezhi 2023-12-20 18:59:21 +08:00 committed by GitHub
parent 0dcfb1d637
commit a72f1530c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -425,7 +425,7 @@ export function registerOptionsControl(config: OptionsConfig) {
const props = this.props;
const formItem = props.formItem as IFormItemStore;
if (prevProps.options !== props.options && formItem) {
if (!props.source && prevProps.options !== props.options && formItem) {
formItem.setOptions(
normalizeOptions(props.options || [], undefined, props.valueField),
this.changeOptionValue,