File tree Expand file tree Collapse file tree
app/workspace/[workspaceId]/tables/[tableId]/components/table-grid Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1909,7 +1909,10 @@ export function TableGrid({
19091909 batchUpdates . push ( { rowId : row . id , data : updates } )
19101910 }
19111911 if ( batchUpdates . length > 0 ) {
1912- batchUpdateRef . current ( { updates : batchUpdates } )
1912+ void chunkBatchUpdates ( batchUpdates , batchUpdateAsyncRef . current ) . catch ( ( error ) => {
1913+ logger . error ( 'Failed to clear selected cells' , { error } )
1914+ toast . error ( 'Failed to clear cells — please try again' )
1915+ } )
19131916 }
19141917 if ( undoCells . length > 0 ) {
19151918 pushUndoRef . current ( { type : 'clear-cells' , cells : undoCells } )
@@ -2083,7 +2086,10 @@ export function TableGrid({
20832086 }
20842087 e . clipboardData ?. setData ( 'text/plain' , lines . join ( '\n' ) )
20852088 if ( batchUpdates . length > 0 ) {
2086- batchUpdateRef . current ( { updates : batchUpdates } )
2089+ void chunkBatchUpdates ( batchUpdates , batchUpdateAsyncRef . current ) . catch ( ( error ) => {
2090+ logger . error ( 'Failed to cut selected cells' , { error } )
2091+ toast . error ( 'Failed to cut — please try again' )
2092+ } )
20872093 }
20882094 if ( undoCells . length > 0 ) {
20892095 pushUndoRef . current ( { type : 'clear-cells' , cells : undoCells } )
Original file line number Diff line number Diff line change 44 * React Query hooks for managing user-defined tables.
55 */
66
7- import { useMemo } from 'react'
7+ import { useEffect , useMemo } from 'react'
88import { createLogger } from '@sim/logger'
99import {
1010 type InfiniteData ,
You can’t perform that action at this time.
0 commit comments