You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: stories/props.stories.mdx
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -22,8 +22,8 @@ import { Meta } from '@storybook/addon-docs';
22
22
| direction | string | no | auto | Accepts: `ltr`, `rtl`, or `auto`. When set to `auto` (default), RDT will attempt to detect direction by checking the HTML and DIV tags. For cases where you need to force rtl, or ltr just set this option manually (i.e. SSR).<br /><br />If you are using Typescript or prefer enums you can `import { Direction } from 'react-data-table-component';` and use `Direction.AUTO, Direction.LTR, or Direction.RTL |
23
23
| onRowClicked |`(row, event) => {}`| no || Callback to access the row, event on row click.<br /> <br /><br />**Note:** If you are using custom cells (`column[].cell`), you will need to apply the `data-tag="allowRowEvents"` to the innermost element or on the elements you want to propagate the `onRowClicked` event to. |
24
24
| onRowDoubleClicked |`(row, event) => {}`| no || Callback to access the row, event on row double click.<br /><br />**Note:** If you are using custom cells (`column[].cell`), you will need to apply the `data-tag="allowRowEvents"` to the innermost element or on the elements you want to propagate the `onRowDoubleClicked` event to. |
25
-
| onRowMouseEnter | `(row, event) => {}` | no | | Callback to access the row, event on the mouse entering the row.
26
-
| onRowMouseLeave | `(row, event) => {}` | no | | Callback to access the row, event on the mouse leaving the row.
25
+
| onRowMouseEnter |`(row, event) => {}`| no || Callback to access the row, event on the mouse entering the row.|
26
+
| onRowMouseLeave |`(row, event) => {}`| no || Callback to access the row, event on the mouse leaving the row.|
27
27
28
28
# Columns
29
29
@@ -33,14 +33,14 @@ import { Meta } from '@storybook/addon-docs';
| defaultSortFieldId | string or number | no | null | The `defaultSortFieldId` sets the a column to be pre sorted and corresponds to the a column definition `id`|
39
-
| defaultSortAsc | boolean | no | true | Set this to false if you want the table data to be sorted in DESC order.<br /><br />**Note:** This will apply work when the table is initially loaded |
40
-
| sortIcon | component | no | built-in | Override the default sort icon - the icon must be a font or svg icon and it should be a "downward" icon since animation will be handled by React Data Table |
41
-
| sortServer | boolean | no | false | Disables internal sorting for use with server-side/remote sorting or when you want to manually control the sort behavior. place your sorting logic and/or api calls in an `onSort` handler. <br /><br />**Note:**`sortFunction` is a better choice if you simply want to override the internal sorting behavior |
42
-
| sortFunction |`(rows, selector, direction) => {}`| no | null | Pass in your own custom sort function. **Your function must return an new array reference**, otherwise RDT will not re-render. For example, `Array.sort` sorts the array in place but because of JavaScript object equality it will be the same reference and will not re-render. A common pattern is to return `yourArray.slice(0)` which creates a new array |
43
-
| onSort |`(selectedColumn, sortDirection) => {}`| no || callback to access the sort state when a column is clicked. returns ([column](/docs/api-columns--page), sortDirection, event) |
| defaultSortFieldId | string or number | no | null | The `defaultSortFieldId` sets the a column to be pre sorted and corresponds to the a column definition `id`|
39
+
| defaultSortAsc | boolean | no | true | Set this to false if you want the table data to be sorted in DESC order.<br /><br />**Note:** This will apply work when the table is initially loaded |
40
+
| sortIcon | component | no | built-in | Override the default sort icon - the icon must be a font or svg icon and it should be a "downward" icon since animation will be handled by React Data Table |
41
+
| sortServer | boolean | no | false | Disables internal sorting for use with server-side/remote sorting or when you want to manually control the sort behavior. place your sorting logic and/or api calls in an `onSort` handler. <br /><br />**Note:**`sortFunction` is a better choice if you simply want to override the internal sorting behavior |
42
+
| sortFunction |`(rows, selector, direction) => {}`| no | null | Pass in your own custom sort function. **Your function must return an new array reference**, otherwise RDT will not re-render. For example, `Array.sort` sorts the array in place but because of JavaScript object equality it will be the same reference and will not re-render. A common pattern is to return `yourArray.slice(0)` which creates a new array |
43
+
| onSort |`(selectedColumn, sortDirection, sortedRows) => {}`| no || callback to access the sort state when a column is clicked. returns ([column](/docs/api-columns--page), sortDirection, event) |
0 commit comments