mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-29 00:16:39 +01:00
cell updates firestore directly used for non-text based fields
This commit is contained in:
@@ -42,7 +42,11 @@ const useCell = (intialOverrides: any) => {
|
||||
cellDispatch({ updatedValue: value });
|
||||
};
|
||||
|
||||
const actions = { set, update };
|
||||
const updateFirestore = (cell: Cell) => {
|
||||
cellDispatch({ cell: null });
|
||||
cellState.updateCell(cell);
|
||||
};
|
||||
const actions = { set, update, updateFirestore };
|
||||
|
||||
return [cellState, actions];
|
||||
};
|
||||
|
||||
@@ -140,7 +140,6 @@ const useTable = (intialOverrides: any) => {
|
||||
// TODO: update row locally
|
||||
// tableState.rows[cell.rowIndex][cell.fieldName] = cell.value;
|
||||
// tableDispatch({ rows: tableState.rows });
|
||||
|
||||
// update document
|
||||
db.collection(tableState.path)
|
||||
.doc(cell.docId)
|
||||
|
||||
Reference in New Issue
Block a user