Skip to content

Commit

Permalink
fix: 修复 crud setData 动作处理报错 (baidu#9765)
Browse files Browse the repository at this point in the history
  • Loading branch information
2betop committed Mar 8, 2024
1 parent f0f3edf commit f407de5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/amis/src/renderers/CRUD.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2727,9 +2727,14 @@ export class CRUDRenderer extends CRUD {
condition?: any
) {
const {store} = this.props;
const len = store.data.items.length;
const len = store.data.items?.length;

if (index !== undefined) {
// TODO 修复以下逻辑
// store.data.items 可能没值
// crud 可能 table 也可能可能是 list 或者 cards,应该交给 body 子组件自己去处理
// 修改完数据应该是类似 quickEdit 修改后的效果,目前界面上无交互出现
// @hsm-lv
let items = [...store.data.items];
const indexs = String(index).split(',');
indexs.forEach(i => {
Expand Down

0 comments on commit f407de5

Please sign in to comment.