mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 01:48:14 +00:00
fix: issue with adding data to sub-table after deletion (#5566)
This commit is contained in:
parent
582f1d7ef8
commit
0b762cf89f
@ -191,12 +191,10 @@ const useTableColumns = (props: { showDel?: any; isSubTable?: boolean }, paginat
|
||||
onClick={() => {
|
||||
return action(() => {
|
||||
const fieldIndex = (current - 1) * pageSize + index;
|
||||
spliceArrayState(field, {
|
||||
startIndex: fieldIndex,
|
||||
deleteCount: 1,
|
||||
});
|
||||
field.value.splice(fieldIndex, 1);
|
||||
return field.onInput(field.value);
|
||||
const updatedValue = [...field.value];
|
||||
updatedValue.splice(fieldIndex, 1);
|
||||
field.value = updatedValue;
|
||||
field.onInput(field.value);
|
||||
});
|
||||
}}
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user