File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ Higher Order Component for [ReactTable](https://react-table.js.org) to enable Dr
99# Documentation
1010
1111- [ Install] ( #install )
12- - [ Storybook examples ] ( #usage )
13- - [ Storybook examples ] ( https://patricktran.github.io/react-table-hoc-draggable-columns/ )
12+ - [ Usage ] ( #usage )
13+ - [ Demo ] ( https://patricktran.github.io/react-table-hoc-draggable-columns/ )
1414
1515## Install
1616
@@ -54,8 +54,21 @@ render () {
5454 / >
5555 )
5656}
57+ ```
58+
59+ ## draggableColumns Prop
60+
61+ | Property | Description | Default value | Type | Required |
62+ | ----------------------- | --------------------------------------------------------------------------------------- | -------------------- | ---------------- | -------- |
63+ | ` mode ` | mode to either 'reorder' the column or 'swap' column position on drop | 'reorder' | string | yes |
64+ | ` draggable ` | array of column accessors to allow drag and drop | | array of strings | |
65+ | ` disableTableScroll ` | disable ReactTable horizontal/vertical scrolling when dragging a column | false | bool | |
66+ | ` overflow ` | used with disableTableScroll={true} to reset ReactTable overflow style onDragEnd event | ` auto ` | string | |
67+ | ` useDragImage ` | clone dragged column element? useful for applying a different css class. | true | bool | |
68+ | ` dragImageClassName ` | dragImageClassName only applies when useDragImage={true} | ` rt-dragged-item ` | string | |
69+ | ` onDragEnterClassName ` | when mode={'swap'} - css class applied on dragged over column | ` rt-drag-enter-item ` | string | |
70+ | ` onDraggedColumnChange ` | callback method to be notified when column order changes - signature: function(columns) | | function | |
5771
5872## License
5973
6074MIT © [ patricktran] ( https://github.com/patricktran )
61- ` ` `
You can’t perform that action at this time.
0 commit comments