Skip to content
Permalink
Browse files

feat(b-table): default the row select feature `selected-variant` to t…

…he `active` variant (#4128)
  • Loading branch information
tmorehouse committed Oct 14, 2019
1 parent 21a822b commit af372b006e08a98fd9e53891c940b458a97e8996
Showing with 5 additions and 6 deletions.
  1. +3 −4 src/components/table/README.md
  2. +1 −1 src/components/table/package.json
  3. +1 −1 src/utils/config-defaults.js
@@ -1541,12 +1541,12 @@ example).

The `selected-variant` can be any of the
[standard (or custom) bootstrap base color variants](/docs/reference/color-variants), or the special
[table `active` variant](/docs/reference/color-variants#table-variants) which takes precedence over
any specific row or cell variants.
[table `active` variant](/docs/reference/color-variants#table-variants) (the default) which takes
precedence over any specific row or cell variants.

For accessibility reasons (specifically for color blind users, or users with color contrast issues),
it is highly recommended to always provide some other visual means of conveying that a row is
selected, such as shown in the example below.
selected, such as a virtual column as shown in the example below.

```html
<template>
@@ -1559,7 +1559,6 @@ selected, such as shown in the example below.
ref="selectableTable"
selectable
:select-mode="selectMode"
selected-variant="active"
:items="items"
:fields="fields"
@row-selected="onRowSelected"
@@ -235,7 +235,7 @@
},
{
"prop": "selectedVariant",
"description": "Bootstrap color theme variant to set selected rows to. use any of hte standard Bootstrap theme variants, or the special table row variant 'active'"
"description": "Bootstrap color theme variant to set selected rows to. Use any of the standard Bootstrap theme color variants, or the special table row variant 'active' (default). Set to an empty string to not use a variant"
},
{
"prop": "showEmpty",
@@ -152,7 +152,7 @@ export default deepFreeze({
variant: null
},
BTable: {
selectedVariant: 'primary',
selectedVariant: 'active',
headVariant: null,
footVariant: null
},

0 comments on commit af372b0

Please sign in to comment.
You can’t perform that action at this time.