Skip to content

Commit

Permalink
feat(b-table): default the row select feature selected-variant to t…
Browse files Browse the repository at this point in the history
…he `active` variant (#4128)
  • Loading branch information
tmorehouse committed Oct 14, 2019
1 parent 21a822b commit af372b0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions src/components/table/README.md
Expand Up @@ -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>
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/components/table/package.json
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/utils/config-defaults.js
Expand Up @@ -152,7 +152,7 @@ export default deepFreeze({
variant: null
},
BTable: {
selectedVariant: 'primary',
selectedVariant: 'active',
headVariant: null,
footVariant: null
},
Expand Down

0 comments on commit af372b0

Please sign in to comment.