mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 20:09:08 +08:00
fix: crud无法获取value的修复 (#2627)
Co-authored-by: AegeanSeaBlue <2285105697@qq.com>
This commit is contained in:
parent
2157cbbdca
commit
1791ccae91
@ -18,6 +18,7 @@ import {
|
|||||||
isObjectShallowModified,
|
isObjectShallowModified,
|
||||||
noop,
|
noop,
|
||||||
isVisible,
|
isVisible,
|
||||||
|
getPropValue,
|
||||||
getVariable,
|
getVariable,
|
||||||
qsstringify,
|
qsstringify,
|
||||||
qsparse
|
qsparse
|
||||||
@ -476,8 +477,9 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
|||||||
this.handleFilterInit({});
|
this.handleFilterInit({});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.props.pickerMode && this.props.value) {
|
const val = getPropValue(this.props);
|
||||||
store.setSelectedItems(this.props.value);
|
if (this.props.pickerMode && val) {
|
||||||
|
store.setSelectedItems(val);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -497,8 +499,9 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
|||||||
this.renderFooterToolbar = this.renderFooterToolbar.bind(this);
|
this.renderFooterToolbar = this.renderFooterToolbar.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.props.pickerMode && this.props.value !== prevProps.value) {
|
const val = getPropValue(this.props);
|
||||||
store.setSelectedItems(props.value);
|
if (this.props.pickerMode && val !== getPropValue(prevProps)) {
|
||||||
|
store.setSelectedItems(val);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.props.filterTogglable !== prevProps.filterTogglable) {
|
if (this.props.filterTogglable !== prevProps.filterTogglable) {
|
||||||
|
Loading…
Reference in New Issue
Block a user