@@ -327,28 +327,29 @@ details.
327
327
328
328
`<b-table>` provides several props to alter the style of the table:
329
329
330
-
| prop | Type | Description |
331
-
| ------------------- | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
332
-
| `striped` | Boolean | Add zebra-striping to the table rows within the `<tbody>` |
333
-
| `bordered` | Boolean | For borders on all sides of the table and cells. |
334
-
| `borderless` | Boolean | removes inner borders from table. |
335
-
| `outlined` | Boolean | For a thin border on all sides of the table. Has no effect if `bordered` is set. |
336
-
| `small` | Boolean | To make tables more compact by cutting cell padding in half. |
337
-
| `hover` | Boolean | To enable a hover highlighting state on table rows within a `<tbody>` |
338
-
| `dark` | Boolean | Invert the colors — with light text on dark backgrounds (equivalent to Bootstrap v4 class `.table-dark`) |
339
-
| `fixed` | Boolean | Generate a table with equal fixed-width columns (`table-layout: fixed;`) |
340
-
| `responsive` | Boolean or String | Generate a responsive table to make it scroll horizontally. Set to `true` for an always responsive table, or set it to one of the breakpoints `'sm'`, `'md'`, `'lg'`, or `'xl'` to make the table responsive (horizontally scroll) only on screens smaller than the breakpoint. See [Responsive tables](#responsive-tables) below for details. |
341
-
| `sticky-header` | Boolean or String | Generates a vertically scrollable table with sticky headers. Set to `true` to enable sticky headers (default table max-height of `300px`), or set it to a string containing a height (with CSS units) to specify a maximum height other than `300px`. See the [Sticky header](#sticky-headers) section below for details. |
342
-
| `stacked` | Boolean or String | Generate a responsive stacked table. Set to `true` for an always stacked table, or set it to one of the breakpoints `'sm'`, `'md'`, `'lg'`, or `'xl'` to make the table visually stacked only on screens smaller than the breakpoint. See [Stacked tables](#stacked-tables) below for details. |
343
-
| `caption-top` | Boolean | If the table has a caption, and this prop is set to `true`, the caption will be visually placed above the table. If `false` (the default), the caption will be visually placed below the table. |
344
-
| `table-variant` | String | Give the table an overall theme color variant. |
345
-
| `head-variant` | String | Use `'light'` or `'dark'` to make table header appear light or dark gray, respectively |
346
-
| `foot-variant` | String | Use `'light'` or `'dark'` to make table footer appear light or dark gray, respectively. If not set, `head-variant` will be used. Has no effect if `foot-clone` is not set |
347
-
| `foot-clone` | Boolean | Turns on the table footer, and defaults with the same contents a the table header |
348
-
| `no-footer-sorting` | Boolean | When `foot-clone` is true and the table is sortable, disables the sorting icons and click behaviour on the footer heading cells. Refer to the [Sorting](#sorting) section below for more details. |
349
-
350
-
**Note:** table style options `fixed`, `stacked`, and `caption-top`, and the table sorting feature,
351
-
requires BootstrapVue's custom CSS.
330
+
| prop | Type | Description |
331
+
| -------------------- | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
332
+
| `striped` | Boolean | Add zebra-striping to the table rows within the `<tbody>` |
333
+
| `bordered` | Boolean | For borders on all sides of the table and cells. |
334
+
| `borderless` | Boolean | removes inner borders from table. |
335
+
| `outlined` | Boolean | For a thin border on all sides of the table. Has no effect if `bordered` is set. |
336
+
| `small` | Boolean | To make tables more compact by cutting cell padding in half. |
337
+
| `hover` | Boolean | To enable a hover highlighting state on table rows within a `<tbody>` |
338
+
| `dark` | Boolean | Invert the colors — with light text on dark backgrounds (equivalent to Bootstrap v4 class `.table-dark`) |
339
+
| `fixed` | Boolean | Generate a table with equal fixed-width columns (`table-layout: fixed;`) |
340
+
| `responsive` | Boolean or String | Generate a responsive table to make it scroll horizontally. Set to `true` for an always responsive table, or set it to one of the breakpoints `'sm'`, `'md'`, `'lg'`, or `'xl'` to make the table responsive (horizontally scroll) only on screens smaller than the breakpoint. See [Responsive tables](#responsive-tables) below for details. |
341
+
| `sticky-header` | Boolean or String | Generates a vertically scrollable table with sticky headers. Set to `true` to enable sticky headers (default table max-height of `300px`), or set it to a string containing a height (with CSS units) to specify a maximum height other than `300px`. See the [Sticky header](#sticky-headers) section below for details. |
342
+
| `stacked` | Boolean or String | Generate a responsive stacked table. Set to `true` for an always stacked table, or set it to one of the breakpoints `'sm'`, `'md'`, `'lg'`, or `'xl'` to make the table visually stacked only on screens smaller than the breakpoint. See [Stacked tables](#stacked-tables) below for details. |
343
+
| `caption-top` | Boolean | If the table has a caption, and this prop is set to `true`, the caption will be visually placed above the table. If `false` (the default), the caption will be visually placed below the table. |
344
+
| `table-variant` | String | Give the table an overall theme color variant. |
345
+
| `head-variant` | String | Use `'light'` or `'dark'` to make table header appear light or dark gray, respectively |
346
+
| `foot-variant` | String | Use `'light'` or `'dark'` to make table footer appear light or dark gray, respectively. If not set, `head-variant` will be used. Has no effect if `foot-clone` is not set |
347
+
| `foot-clone` | Boolean | Turns on the table footer, and defaults with the same contents a the table header |
348
+
| `no-footer-sorting` | Boolean | When `foot-clone` is true and the table is sortable, disables the sorting icons and click behaviour on the footer heading cells. Refer to the [Sorting](#sorting) section below for more details. |
349
+
| `no-border-collapse` | Boolean | Disables the default of collapsing of the table borders. Mainly for use with [sticky headers](#sticky-headers) and/or [sticky columns](#sticky-columns). Will cause the appearance of double borders in some situations. |
350
+
351
+
**Note:** table style options `fixed`, `stacked`, `caption-top`, `no-border-collapse`, sticky
352
+
headers, sticky columns, and the table sorting feature, all require BootstrapVue's custom CSS.
352
353
353
354
**Example: Basic table styles**
354
355
@@ -365,6 +366,7 @@ requires BootstrapVue's custom CSS.
365
366
<b-form-checkbox v-model="dark" inline>Dark</b-form-checkbox>
366
367
<b-form-checkbox v-model="fixed" inline>Fixed</b-form-checkbox>
367
368
<b-form-checkbox v-model="footClone" inline>Foot Clone</b-form-checkbox>
369
+
<b-form-checkbox v-model="noCollapse" inline>No border collapse</b-form-checkbox>
368
370
</b-form-group>
369
371
<b-form-group label="Head Variant" label-cols-lg="2">
370
372
<b-form-radio-group v-model="headVariant" class="mt-lg-2">
@@ -395,6 +397,7 @@ requires BootstrapVue's custom CSS.
395
397
:dark="dark"
396
398
:fixed="fixed"
397
399
:foot-clone="footClone"
400
+
:no-border-collapse="noCollapse"
398
401
:items="items"
399
402
:fields="fields"
400
403
:head-variant="headVariant"
@@ -433,7 +436,8 @@ requires BootstrapVue's custom CSS.
433
436
fixed: false,
434
437
footClone: false,
435
438
headVariant: null,
436
-
tableVariant: ''
439
+
tableVariant: '',
440
+
noCollapse: false
437
441
}
438
442
}
439
443
}
@@ -1249,9 +1253,8 @@ available horizontal space.
1249
1253
- BootstrapVue's custom CSS is required in order to support `sticky-header`.
1250
1254
- Bootstrap v4 uses the CSS style `border-collapse: collapsed` on table elements. This prevents the
1251
1255
borders on the sticky header from "sticking" to the header, and hence the borders will scroll when
1252
-
the body scrolls. To get around this issue, create some custom CSS that targets
1253
-
`table.table.b-table`, which sets they styles `border-collapse: separate; border-spacing: 0px;`
1254
-
(note that this may cause double borders when using features such as `bordered`, etc).
1256
+
the body scrolls. To get around this issue, set the pop `no-border-collapse` on the table (note
1257
+
that this may cause double width borders when using features such as `bordered`, etc).
1255
1258
- The sticky header feature uses CSS style `position: sticky` to position the headings. Internet
1256
1259
Explorer does not support `position: sticky`, hence for IE11 the table headings will scroll with
1257
1260
the table body.
@@ -1269,8 +1272,17 @@ set.
1269
1272
```html
1270
1273
<template>
1271
1274
<div>
1272
-
<b-form-checkbox v-model="stickyHeader" class="mb-2">Sticky header</b-form-checkbox>
1273
-
<b-table :sticky-header="stickyHeader" responsive :items="items" :fields="fields">
1275
+
<div class="mb-2">
1276
+
<b-form-checkbox v-model="stickyHeader" inline>Sticky header</b-form-checkbox>
1277
+
<b-form-checkbox v-model="noCollapse" inline>No border collapse</b-form-checkbox>
1278
+
</div>
1279
+
<b-table
1280
+
:sticky-header="stickyHeader"
1281
+
:no-border-collapse="noCollapse"
1282
+
responsive
1283
+
:items="items"
1284
+
:fields="fields"
1285
+
>
1274
1286
<!-- We are using utility class `text-nowrap` to help illustrate horizontal scrolling -->
1275
1287
<template v-slot:head(id)="scope">
1276
1288
<div class="text-nowrap">Row ID</div>
@@ -1289,6 +1301,7 @@ set.
1289
1301
data() {
1290
1302
return {
1291
1303
stickyHeader: true,
1304
+
noCollapse: false,
1292
1305
fields: [
1293
1306
{ key: 'id', stickyColumn: true, isRowHeader: true, variant: 'primary' },
1294
1307
'a',
@@ -1335,13 +1348,12 @@ set.
1335
1348
previous sticky columns.
1336
1349
- Bootstrap v4 uses the CSS style `border-collapse: collapsed` on table elements. This prevents any
1337
1350
borders on the sticky columns from "sticking" to the column, and hence those borders will scroll
1338
-
when the body scrolls. To get around this issue, create some custom CSS that targets
1339
-
`table.table.b-table`, which sets they styles `border-collapse: collapsed; border-spacing: 0px;`
1340
-
(note that this may cause double borders when using features such as `bordered`, etc).
1351
+
when the body scrolls. To get around this issue, set the prop `no-border-collapse` on the table
1352
+
(note that this may cause double width borders when using features such as `bordered`, etc).
1341
1353
- BootstrapVue's custom CSS is required in order to support sticky columns.
1342
-
- The sticky column feature uses CSS style `position: sticky` to position the column cells.
1343
-
- Internet Explorer does not support `position: sticky`, hence for IE11 the sticky column will
1344
-
scroll with the table body.
1354
+
- The sticky column feature uses CSS style `position: sticky` to position the column cells. Internet
1355
+
Explorer does not support `position: sticky`, hence for IE11 the sticky column will scroll with
1356
+
the table body.
1345
1357
1346
1358
### Row details support
1347
1359
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4