Picker 修复外部数据更新没有同步进来的问题

This commit is contained in:
liaoxuezhi 2019-08-06 16:24:35 +08:00
parent 99bfca1e4c
commit d4290e6fbc

View File

@ -207,6 +207,10 @@ export default class CRUD extends React.Component<CRUDProps, any> {
this.renderFooterToolbar = this.renderFooterToolbar.bind(this);
}
if (this.props.pickerMode && this.props.value !== nextProps.value) {
store.setSelectedItems(nextProps.value);
}
if (this.props.filterTogglable !== nextProps.filterTogglable) {
store.setFilterTogglable(!!nextProps.filterTogglable, nextProps.filterDefaultVisible);
}