mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
fix: crud兼容cards使用场景 (#7841)
Co-authored-by: wanglinfang <wanglinfang@baidu.com>
This commit is contained in:
parent
d66030bb1f
commit
2d65369964
@ -562,7 +562,6 @@ exports[`Renderer:input table add 1`] = `
|
||||
>
|
||||
<table
|
||||
class="cxd-Table-table"
|
||||
style="table-layout: fixed;"
|
||||
>
|
||||
<colgroup>
|
||||
<col
|
||||
|
@ -585,14 +585,15 @@ export default class CRUD extends React.Component<CRUDProps, any> {
|
||||
// 显隐切换时,也会导致需要二次点击才能选中的问题
|
||||
let val: any;
|
||||
const valueField = props.valueField || props.primaryField;
|
||||
|
||||
if (
|
||||
this.props.pickerMode &&
|
||||
isArrayChildrenModified(
|
||||
(val = getPropValue(this.props)).map((item: any) => item[valueField]),
|
||||
getPropValue(prevProps).map((item: any) => item[valueField])
|
||||
(val = getPropValue(this.props))?.map((item: any) => item[valueField]),
|
||||
getPropValue(prevProps)?.map((item: any) => item[valueField])
|
||||
) &&
|
||||
!isEqual(
|
||||
val.map((item: any) => item[valueField]),
|
||||
val?.map((item: any) => item[valueField]),
|
||||
store.selectedItems.concat().map((item: any) => item[valueField])
|
||||
)
|
||||
) {
|
||||
|
Loading…
Reference in New Issue
Block a user