修复 picker 读取选项接口不执行的问题

This commit is contained in:
2betop 2020-03-03 15:59:31 +08:00
parent 70f936bcb9
commit 5dedf50a79
2 changed files with 6 additions and 3 deletions

View File

@ -26,6 +26,7 @@
}
.#{$ns}ContextMenu {
z-index: $zindex-contextmenu;
position: fixed;
left: 0;
top: 0;

View File

@ -92,13 +92,15 @@ export default class PickerControl extends React.PureComponent<
fetchOptions() {
const {value, formItem, valueField, labelField, source, data} = this.props;
let selectedOptions: any;
if (
!source ||
!formItem ||
!formItem.selectedOptions.length ||
formItem.selectedOptions[0][valueField || 'value'] !==
formItem.selectedOptions[0][labelField || 'label']
((selectedOptions = formItem.getSelectedOptions(value)) &&
(!selectedOptions.length ||
selectedOptions[0][valueField || 'value'] !==
selectedOptions[0][labelField || 'label']))
) {
return;
}