Skip to content

Commit b7a6eda

Browse files
committed
use updated instance of Cell
1 parent 96697cb commit b7a6eda

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/main/src/components/AnalyticalTable/hooks/useRowSelectionColumn.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const noop = () => {
1919

2020
export const useRowSelectionColumn: PluginHook<{}> = (hooks) => {
2121
hooks.columns.push((columns, { instance }) => {
22-
const { webComponentsReactProperties, dispatch, toggleRowSelected, selectedFlatRows } = instance;
22+
const { webComponentsReactProperties } = instance;
2323
const { selectionMode, onRowSelected, selectionBehavior } = webComponentsReactProperties;
2424

2525
if (selectionMode === TableSelectionMode.NONE || selectionBehavior === TableSelectionBehavior.ROW_ONLY) {
@@ -67,7 +67,8 @@ export const useRowSelectionColumn: PluginHook<{}> = (hooks) => {
6767
// The cell can use the individual row's getToggleRowSelectedProps method
6868
// to the render a checkbox
6969
// eslint-disable-next-line react/prop-types,react/display-name
70-
Cell: ({ row }) => {
70+
Cell: (instance) => {
71+
const { row, webComponentsReactProperties, dispatch, toggleRowSelected, selectedFlatRows } = instance;
7172
const handleCellClick = (e) => {
7273
if (TableSelectionBehavior.ROW_SELECTOR === selectionBehavior) {
7374
toggleSelected(e, row, webComponentsReactProperties, dispatch, toggleRowSelected, selectedFlatRows);

0 commit comments

Comments
 (0)