Skip to content

Commit 7f35540

Browse files
authored
Fix checkboxes unchecking when user clicks outside the table (#3271)
1 parent 8a1492e commit 7f35540

File tree

2 files changed

+0
-27
lines changed

2 files changed

+0
-27
lines changed

webview/src/experiments/components/table/Table.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import { InstanceProp, RowProp } from './interfaces'
1414
import { RowSelectionContext } from './RowSelectionContext'
1515
import { TableBody } from './TableBody'
1616
import { Indicators } from './Indicators'
17-
import { useClickOutside } from '../../../shared/hooks/useClickOutside'
1817
import { ExperimentsState } from '../../store'
1918
import { getSelectedForPlotsCount } from '../../util/rows'
2019

@@ -42,12 +41,6 @@ export const Table: React.FC<TableProps> = ({
4241

4342
const tableRef = useRef<HTMLTableElement>(null)
4443

45-
const clickOutsideHandler = useCallback(() => {
46-
clearSelectedRows?.()
47-
}, [clearSelectedRows])
48-
49-
useClickOutside(tableRef, clickOutsideHandler)
50-
5144
const batchRowSelection = useCallback(
5245
({ row: { id } }: RowProp) => {
5346
const lastSelectedRowId = lastSelectedRow?.row.id ?? ''

webview/src/shared/hooks/useClickOutside.ts

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)