File tree Expand file tree Collapse file tree
BaseTable/__stories__/stories
Table/__stories__/stories Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,6 +97,8 @@ const data: Person[] = [
9797const SortingExample = () => {
9898 const [sorting, setSorting] = React .useState <SortingState >([]);
9999
100+ // Ваша колонка ДОЛЖНА иметь accessorFn для включения сортировки
101+
100102 const table = useTable ({
101103 columns ,
102104 data ,
Original file line number Diff line number Diff line change @@ -97,6 +97,8 @@ const data: Person[] = [
9797const SortingExample = () => {
9898 const [sorting, setSorting] = React .useState <SortingState >([]);
9999
100+ // Your column MUST have accessorFn for sorting to be enabled
101+
100102 const table = useTable ({
101103 columns ,
102104 data ,
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ import {data} from '../constants/data';
1010export const SortingStory = ( ) => {
1111 const [ sorting , setSorting ] = React . useState < SortingState > ( [ ] ) ;
1212
13+ // Your column MUST have accessorFn for sorting to be enabled
14+
1315 const table = useTable ( {
1416 columns,
1517 data,
Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ import './SortingStory.scss';
1515export const SortingStory = ( ) => {
1616 const [ sorting , setSorting ] = React . useState < SortingState > ( [ ] ) ;
1717
18+ // Your column MUST have accessorFn for sorting to be enabled
19+
1820 const table = useTable ( {
1921 columns,
2022 data,
You can’t perform that action at this time.
0 commit comments