修复 Picker 无法自动选中的问题 (#2430)

* fix: 修复input-date组件设置minDate确认不生效问题

* 修复picker无法自动选中的问题
This commit is contained in:
RickCole 2021-08-24 18:47:46 +08:00 committed by GitHub
parent ca2069613a
commit 376d6609a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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