Skip to content

Commit

Permalink
docs(data-table): add some more docs (#404)
Browse files Browse the repository at this point in the history
  • Loading branch information
tw15egan authored and marijohannessen committed Nov 7, 2017
1 parent c54b98a commit ebf60b3
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/components/data-table-v2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ The update to tables splits out the `scss` files into multiple partial files wit

#### Events

| Key | Value | Description |
|--------------------------|----------------------------------|--------------------------------------------|
| eventBeforeExpand | data-table-v2-beforetoggleexpand | Row expansion event |
| eventAfterExpand | data-table-v2-aftertoggleexpand | Row expansion event |
| eventBeforeSort | data-table-v2-beforetogglesort | Sort event |
| eventAfterSort | data-table-v2-aftertogglesort | Sort event |
| eventTrigger | [data-event] | Data attribute for clickable events |
| eventParentContainer | [data-parent-row] | Data attribute for event container |


#### Options
Expand All @@ -56,19 +64,15 @@ The update to tables splits out the `scss` files into multiple partial files wit
| classExpandableRowHover | bx--expandable-row--hover-v2 | Hover styles class |
| classTableSortAscending | bx--table-sort-v2--ascending | Ascending sort icon class |
| classTableSortActive | bx--table-sort-v2--active | Active sort icon class |
| eventBeforeExpand | data-table-v2-beforetoggleexpand | Row expansion event |
| eventAfterExpand | data-table-v2-aftertoggleexpand | Row expansion event |
| eventBeforeSort | data-table-v2-beforetogglesort | Sort event |
| eventAfterSort | data-table-v2-aftertogglesort | Sort event |
| eventTrigger | [data-event] | Data attribute for clickable events |
| eventParentContainer | [data-parent-row] | Data attribute for event container |


### FAQ

**How do I sort the tables**
The table component does not sort the table for you, rather it emits an event and toggles the sort UI. It is up to the user to re-render the table rows sorted; you can see this in action `here`.

**How do I use the expandable rows**
If you would like to programmatically expand table rows, you can add the `bx--expandable-row-v2` to the `selectorParentRows` elements.


**How do I activate the batch actions pane**
**How do I activate the batch actions pane**
If you would like to programmatically activate the batch actions pane, you can add `bx--batch-actions--active` to the `bx--batch-actions` element.

0 comments on commit ebf60b3

Please sign in to comment.