Skip to content

Commit 39334bd

Browse files
authored
fix(tables): one small tables ting (#3497)
1 parent a6d3b3a commit 39334bd

File tree

1 file changed

+3
-0
lines changed
  • apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table

1 file changed

+3
-0
lines changed

apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table/table.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,7 @@ export function Table({
748748
setSelectionAnchor(moveCell(anchor, cols.length, totalRows, -1))
749749
}
750750
setSelectionFocus(null)
751+
containerRef.current?.focus({ preventScroll: true })
751752
}, [])
752753

753754
const handleInlineSave = useCallback(
@@ -771,6 +772,7 @@ export function Table({
771772
const handleInlineCancel = useCallback(() => {
772773
setEditingCell(null)
773774
setInitialCharacter(null)
775+
containerRef.current?.focus({ preventScroll: true })
774776
}, [])
775777

776778
const handleEmptyRowClick = useCallback((rowIndex: number, columnName: string) => {
@@ -849,6 +851,7 @@ export function Table({
849851
const handleEmptyRowCancel = useCallback(() => {
850852
setEditingEmptyCell(null)
851853
setInitialCharacter(null)
854+
containerRef.current?.focus({ preventScroll: true })
852855
}, [])
853856

854857
const generateColumnName = useCallback(() => {

0 commit comments

Comments
 (0)