mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-29 00:16:39 +01:00
fix: delete first row in Array Sub Table
This commit is contained in:
@@ -201,7 +201,7 @@ export function useFirestoreDocAsCollectionWithAtom<T = TableRow>(
|
||||
useEffect(() => {
|
||||
if (deleteDocAtom) {
|
||||
setDeleteRowAtom(() => (_: string, options?: ArrayTableRowData) => {
|
||||
if (!options || !options.index) return;
|
||||
if (!options || options.index === undefined) return;
|
||||
const updateFunction = deleteRow(options.index);
|
||||
return setRows(updateFunction);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user