const currentRow = filterRows.find((row) => row.id === currentId);
const selectedOption = autocompletePickOptions("type").find(
(option) => option.value === selectValue
);
setFilterRows(
filterRows.map((row) =>
row.id === currentId
? { ...row, type: selectedOption?.label }
: row
)
);
// console.log(currentRow);
// const changeCurrentRowId: Row = {
// ...currentRow,
// type: selectedOption?.label,
// };
// const filteredRows = filterRows.filter((row) => row.id !== currentId);
// setFilterRows(() => {
// const newfilter = [...filteredRows, changeCurrentRowId];
// // newfilter.sort((a:Row, b: Row)=> a.id - b.id);
// console.log(newfilter);
// return newfilter;
// });