fix: the selected data in the sub table is overwritten by default values (#5075)

This commit is contained in:
Katherine 2024-08-17 17:29:56 +08:00 committed by GitHub
parent 84ca0eb296
commit 2c466db7bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -154,6 +154,7 @@ export const SubTable: any = observer(
onClick() { onClick() {
selectedRows.map((v) => field.value.push(v)); selectedRows.map((v) => field.value.push(v));
field.onInput(field.value); field.onInput(field.value);
field.initialValue = field.value;
setSelectedRows([]); setSelectedRows([]);
setVisible(false); setVisible(false);
}, },