@@ -46,7 +46,7 @@ custom rendering, events, and asynchronous data.
46
46
<pre >{{ modalDetails.data }}</pre >
47
47
</b-modal >
48
48
49
- </div >
49
+ </div >
50
50
</template >
51
51
52
52
<script >
@@ -130,7 +130,7 @@ export default {
130
130
```
131
131
132
132
### ` fields ` prop
133
- The ` fields ` prop is used to display table columns.
133
+ The ` fields ` prop is used to display table columns.
134
134
Keys are used to extract real value from each row.
135
135
Example format:
136
136
``` js
@@ -175,7 +175,7 @@ in the Vue.js guide.
175
175
name: ' Havij'
176
176
},
177
177
{
178
- _cellVariants: {
178
+ _cellVariants: {
179
179
age: ' danger' , // Displayes cell for field 'age' red
180
180
name: ' success' // Displayes cell for field 'name' green
181
181
},
@@ -198,7 +198,7 @@ the record, will be prefered.
198
198
199
199
` items ` can also be a reference to a * provider* function, which returns an ` Array ` of items data.
200
200
Provider functions can also be asynchronous:
201
- - By returning ` null ` (or ` undefined ` ) and calling a callback, when the data is
201
+ - By returning ` null ` (or ` undefined ` ) and calling a callback, when the data is
202
202
ready, with the data array as the only argument to the callback,
203
203
- By returning a ` Promise ` that resolves to an array.
204
204
@@ -297,7 +297,7 @@ The slot's scope variable (`data` in the above sample) will have the following p
297
297
| ` item ` | Object | The entire record (i.e. ` items[index] ` ) for this row
298
298
| ` index ` | Number | The row number (zero based)
299
299
300
- ** Note** that ` index ` will not always be the actual row's index number, as it is
300
+ ** Note** that ` index ` will not always be the actual row's index number, as it is
301
301
computed after pagination and filtering have been applied to the original
302
302
table data. The ` index ` value will refer to the ** displayed row number** . This
303
303
number will align with the indexes from the optional ` v-model ` bound variable.
@@ -344,8 +344,8 @@ If you bind a variable to the `v-model` prop, the contents of this variable will
344
344
be the currently disaplyed item records (zero based index, up to ` page-size ` - 1).
345
345
This variable (the ` value ` prop) should usually be treated as readonly.
346
346
347
- The records within the v-model are a filtered/paginated shallow copy of ` items ` , and
348
- hence any changes to a record's properties in the v-model will be reflected in
347
+ The records within the v-model are a filtered/paginated shallow copy of ` items ` , and
348
+ hence any changes to a record's properties in the v-model will be reflected in
349
349
the original ` items ` array (except when ` items ` is set to a provider function).
350
350
Deleteing a record from the v-model will ** not** remove the record from the
351
351
original items array.
@@ -372,7 +372,7 @@ The built-in default `sort-compare` function sorts the specified field `key` bas
372
372
on the data in the underlying record object. The field value is first stringified
373
373
if it is an object, and then sorted.
374
374
375
- The default ` sort-compare ` routine ** cannot** sort neither virtual columns, nor
375
+ The default ` sort-compare ` routine ** cannot** sort neither virtual columns, nor
376
376
based on the custom rendering of the field data (which is used only for presentation).
377
377
For this reason, you can provide your own custom sort compare routine by passing a
378
378
function reference to the prop ` sort-compare ` .
@@ -402,7 +402,7 @@ if (typeof a[key] === 'number' && typeof b[key] === 'number') {
402
402
```
403
403
404
404
### Using Items Provider Functions
405
- As mentioned under the ` items ` prop section, it is possible to use a function to provide
405
+ As mentioned under the ` items ` prop section, it is possible to use a function to provide
406
406
the row data (items), by specifying a function reference via the ` items ` prop.
407
407
408
408
** Note:** The ` items-provider ` prop has been deprecated in favour of providing a function
@@ -433,7 +433,7 @@ function myProvider(ctx) {
433
433
let items = [];
434
434
435
435
// perform any items processing needed
436
-
436
+
437
437
// Must return an array
438
438
return items || [];
439
439
}
@@ -471,7 +471,7 @@ function myProvider(ctx) {
471
471
}
472
472
```
473
473
474
- ` <b-table> ` provides a ` busy ` prop that will flag the table as busy, which you can
474
+ ` <b-table> ` provides a ` busy ` prop that will flag the table as busy, which you can
475
475
set to ` true ` just before your async fetch, and then set it to ` false ` once you have
476
476
your data, and just before you send it to the table for display. Example:
477
477
@@ -499,7 +499,7 @@ methods: {
499
499
}
500
500
```
501
501
502
- By default, the items provider function is responsible for ** all paging, filtering, and sorting**
502
+ By default, the items provider function is responsible for ** all paging, filtering, and sorting**
503
503
of the data, before passing it to ` b-table ` for display.
504
504
505
505
You can disable provider paging, filtering, and sorting (individually) by setting the
@@ -520,7 +520,7 @@ trigger the calling of the provider function. So be sure to bind to the `per-pa
520
520
(unless you have the respective ` no-provider-* ` prop set to ` true ` ).
521
521
522
522
#### Event based refreshing of data:
523
- You may also trigger the refresh of the provider function by emitting the
523
+ You may also trigger the refresh of the provider function by emitting the
524
524
event ` table::refresh ` on ` $root ` with the single argument being the ` id ` of your ` b-table ` .
525
525
You must have a unique ID on your table for this to work.
526
526
0 commit comments