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
State for what is selected is managed by you, the consumer.
10
+
This plugin provides helpful utilities and automatically wires up event listeners for each row.
11
+
12
+
### ColumnOptions
13
+
14
+
None
15
+
16
+
17
+
### TableOptions
18
+
19
+
Required:
20
+
-`selection` - a collection of what is already selected
21
+
-`onSelect` - event handler for when a row is selected
22
+
-`onDeselect` - event handler for when a row is deselected
23
+
24
+
Optional:
25
+
-`key` - a function which will be passed to `onSelect` and `onDeselect` for helping manage "what" is selected. This should be the same data type as the individual elements within the `selection`
26
+
27
+
28
+
See the API Documentation [here][api-docs] for the full list of options and descriptions.
29
+
30
+
### Preferences
31
+
32
+
None
33
+
34
+
### Accessibility
35
+
36
+
Without a focusable element to trigger a row selection,
37
+
keyboard and screen reader users will not be able to select a row.
38
+
When using this plugin, ensure that each row has a focusable element that interacts with the selection APIs for that row.
39
+
40
+
### Helpers + StrictMode
41
+
42
+
There are convenience helpers for aiding in more ergonomic template usage when using this plugin.
43
+
44
+
```gjs
45
+
import { on } from '@ember/modifier';
46
+
import { fn } from '@ember/helper';
47
+
import { toggle, isSelected } from 'ember-headless-table/plugins/row-selection';
0 commit comments