Skip to content

Commit af372b0

Browse files
authored
feat(b-table): default the row select feature selected-variant to the active variant (bootstrap-vue#4128)
1 parent 21a822b commit af372b0

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

src/components/table/README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1541,12 +1541,12 @@ example).
15411541

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

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

15511551
```html
15521552
<template>
@@ -1559,7 +1559,6 @@ selected, such as shown in the example below.
15591559
ref="selectableTable"
15601560
selectable
15611561
:select-mode="selectMode"
1562-
selected-variant="active"
15631562
:items="items"
15641563
:fields="fields"
15651564
@row-selected="onRowSelected"

src/components/table/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@
235235
},
236236
{
237237
"prop": "selectedVariant",
238-
"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'"
238+
"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"
239239
},
240240
{
241241
"prop": "showEmpty",

src/utils/config-defaults.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export default deepFreeze({
152152
variant: null
153153
},
154154
BTable: {
155-
selectedVariant: 'primary',
155+
selectedVariant: 'active',
156156
headVariant: null,
157157
footVariant: null
158158
},

0 commit comments

Comments
 (0)