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
@@ -612,7 +612,7 @@ for details and usage of `<colgroup>`
612
612
## Table busy state
613
613
`<b-table>` provides a `busy` prop that will flag the table as busy, which you can
614
614
set to `true` just before you update your items, and then set it to `false` once you have
615
-
your items. When in hte busy state, the tabe will have the attribute `aria-busy="true"`.
615
+
your items. When in the busy state, the table will have the attribute `aria-busy="true"`.
616
616
617
617
During the busy state, the table will be rendered in a "muted" look (`opacity: 0.6`), using the
618
618
following custom CSS:
@@ -746,11 +746,12 @@ The slot's scope variable (`data` in the above sample) will have the following p
746
746
| `unformatted` | Any | The raw value for this key in the item record (`null` or `undefined` if a virtual column), before being passed to the field's `formatter` function
747
747
| `detailsShowing` | Boolean | Will be `true` if the row's `row-details` scoped slot is visible. See section [**Row details support**](#row-details-support) below for additional information
748
748
| `toggleDetails` | Function | Can be called to toggle the visibility of the rows `row-details` scoped slot. See section [**Row details support**](#row-details-support) below for additional information
749
+
| `rowSelected` | Boolean | Will be `true` if the row has been selected. See section [**Row select support**](#row-select-support) for additional information
749
750
750
751
751
752
**Notes:**
752
753
-_`index` will not always be the actual row's index number, as it is
753
-
computed after pagination and filtering have been applied to the original
754
+
computed after filtering, sorting and pagination have been applied to the original
754
755
table data. The `index` value will refer to the **displayed row number**. This
755
756
number will align with the indexes from the optional `v-model` bound variable._
756
757
@@ -901,6 +902,64 @@ event will not be emitted when the input, select, textarea is clicked (unless th
901
902
(even when disabled)
902
903
903
904
905
+
## Row select support
906
+
You can make rows selectable, by using the prop `selectable`.
907
+
908
+
Users can easily change the selecting mode by setting the `select-mode` prop.
909
+
-`multi`: each click will select/deselect the row (default mode)
910
+
-`single`: only a single row can be selected at one time
911
+
-`range`: any row clicked is toggled, any other deselected. the SHIFT key selects a range of
912
+
rows, and CTRL/CMD click will toggle the selected row.
913
+
914
+
When a table is `selectable` and the user clicks on a row, `<b-table>` will emit the `row-selected`
915
+
event, passing a single argument which is the complete list of selected items.
-_Paging, filtering, or sorting will clear the selection. The `row-selected` event will be emitted with an empty array._
960
+
-_Selected rows will have a class of `b-row-selected` added to them._
961
+
-_When the table is in `selectable` mode, all data item `<tr>` elements will be in the document tab sequence (`tabindex="0"`) for accesibility reasons._
962
+
904
963
## Row details support
905
964
If you would optionally like to display additional record information (such as
906
965
columns not specified in the fields definition array), you can use the scoped slot
@@ -1404,6 +1463,22 @@ when fetching your data!
1404
1463
When `b-table` is mounted in the document, it will automatically trigger a provider update call.
1405
1464
1406
1465
1466
+
## Table accessibility notes
1467
+
When the table is in `selectable` mode, or if there is a `row-clicked` event listener registered, all
1468
+
data item rows (`<tr>` elements) will be placed into the document tab sequence (via `tabindex="0"`) to
1469
+
allow keyboard-only and screen reader users the ability to click the rows.
1470
+
1471
+
When a column (field) is sortable, the header (and footer) heading cells will also be placed into the
1472
+
document tab sequence for accesibility.
1473
+
1474
+
Note the following row based events/actions are not considered accessible, and should only be used if the
1475
+
functionality is non critical or can be provided via other means:
0 commit comments