From 6649b21abe29c21367526d76c1f05c67aee5e0aa Mon Sep 17 00:00:00 2001 From: Shaun Sweet Date: Thu, 8 Feb 2018 09:58:24 -0700 Subject: [PATCH] docs: add select HOC docs to better document how to use the HOC (#733) --- src/hoc/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/hoc/README.md b/src/hoc/README.md index 69711c0..92c86cb 100644 --- a/src/hoc/README.md +++ b/src/hoc/README.md @@ -63,6 +63,11 @@ You include the HOC in the same manner as you would for the treeTableHOC but the - toggleSelection - called when the use clicks a specific checkbox/radio in a row - selectType - either `checkbox|radio` to indicate what type of selection is required +**Note:** The select field defaults to the accessor `_id` property in order to render the select field for that particular row. If your objects have different +unique ID fields, make sure to tell React Table that by passing it the `keyField` property. +```Javascript + +``` In the case of `radio` there is no `selectAll` displayed but the developer is responsible for only making one selection in the controlling component's state. You could select multiple but it wouldn't make sense and you should use `checkbox` instead.