const handleSave = (row: DataType) => {
const newData: any = [...menuData.list];
const index = newData.findIndex((item: any) => row?.id == item.id);
const item = newData[index];
newData.splice(index, 1, {
...item,
...row,
});
console.log(newData, "newDatanewDatanewDatanewData")
setMenuData({
list: newData, page: {
dataTotal: menuData.page.dataTotal,
size: menuData.page.size,
}
});
};