Skip to content

Commit

Permalink
Merge pull request baidu#9512 from 2betop/table-formitem-change
Browse files Browse the repository at this point in the history
fix: 修复单元格中直接放表单项 name 为带路径的变量时值修改不符合预期的问题
  • Loading branch information
hsm-lv committed Jan 25, 2024
2 parents f7ddf6e + 36386c8 commit 23fdeb0
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions packages/amis/src/renderers/Table/TableRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
RendererEvent,
RendererProps,
autobind,
setVariable,
traceProps
} from 'amis-core';
import {Action} from '../Action';
Expand Down Expand Up @@ -157,15 +158,10 @@ export class TableRow extends React.PureComponent<
}

const {item, onQuickChange} = this.props;
const data: any = {};
setVariable(data, name, value);

onQuickChange?.(
item,
{
[name]: value
},
submit,
changePristine
);
onQuickChange?.(item, data, submit, changePristine);
}

render() {
Expand Down

0 comments on commit 23fdeb0

Please sign in to comment.