Skip to content

Commit e85e84e

Browse files
committed
WIP: Update react-table to rc.5
1 parent 9f65904 commit e85e84e

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

packages/main/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"lodash.debounce": "^4.0.8",
3030
"react-content-loader": "^4.3.2",
3131
"react-jss": "10.0.0",
32-
"react-table": "7.0.0-beta.27",
32+
"react-table": "7.0.0-rc.5",
3333
"react-toastify": "^5.4.1",
3434
"react-window": "^1.8.5"
3535
},

packages/main/src/components/AnalyticalTable/index.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ import {
2828
useGroupBy,
2929
useResizeColumns,
3030
useSortBy,
31-
useTable
31+
useTable,
32+
Column
3233
} from 'react-table';
3334
import { CommonProps } from '../../interfaces/CommonProps';
3435
import { JSSTheme } from '../../interfaces/JSSTheme';
@@ -47,11 +48,11 @@ import { useTableRowStyling } from './hooks/useTableRowStyling';
4748
import { useTableScrollHandles } from './hooks/useTableScrollHandles';
4849
import { useTableStyling } from './hooks/useTableStyling';
4950
import { useToggleRowExpand } from './hooks/useToggleRowExpand';
50-
import { reducer } from './tableReducer/reducer';
51+
import { stateReducer } from './tableReducer/stateReducer';
5152
import { TitleBar } from './TitleBar';
5253
import { VirtualTableBody } from './virtualization/VirtualTableBody';
5354

54-
export interface ColumnConfiguration {
55+
export interface ColumnConfiguration extends Column {
5556
accessor?: string;
5657
width?: number;
5758
hAlign?: TextAlign;
@@ -193,7 +194,7 @@ const AnalyticalTable: FC<TableProps> = forwardRef((props: TableProps, ref: Ref<
193194
data,
194195
defaultColumn,
195196
getSubRows,
196-
reducer,
197+
stateReducer,
197198
...reactTableOptions
198199
},
199200
useFilters,

packages/main/src/components/AnalyticalTable/tableReducer/reducer.ts renamed to packages/main/src/components/AnalyticalTable/tableReducer/stateReducer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export const reducer = (newState, action, prevState) => {
1+
export const stateReducer = (newState, action, prevState) => {
22
const { payload } = action;
33
switch (action.type) {
44
case 'SET_GROUP_BY':

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14536,10 +14536,10 @@ react-syntax-highlighter@^8.0.1:
1453614536
prismjs "^1.8.4"
1453714537
refractor "^2.4.1"
1453814538

14539-
14540-
version "7.0.0-beta.27"
14541-
resolved "https://registry.yarnpkg.com/react-table/-/react-table-7.0.0-beta.27.tgz#0505aed2beffedc596dd003e72c91a4709b91456"
14542-
integrity sha512-Lkc8xIwc6OhV4RV753zJt/29WdPh0H5TlZVT8KRjiCaX4Xcrx/MI0kAG+WljxIz9USN6+FYiKrYVtOcScHIxBA==
14539+
14540+
version "7.0.0-rc.5"
14541+
resolved "https://registry.yarnpkg.com/react-table/-/react-table-7.0.0-rc.5.tgz#6d0caf6b6003c19c3e36dfd7c926f5b40dee0c30"
14542+
integrity sha512-hMrnKMvKOfqbHv3WUxmActkTj06Y8r3v/HIZ2H6CRqhgjGV3gtONn2N1w9lLCY7NE3x7BtD+YhtmacYhWkGtJA==
1454314543

1454414544
react-test-renderer@^16.0.0-0:
1454514545
version "16.8.6"

0 commit comments

Comments
 (0)