bootstrap-vue-next: B-Table not working as expected after update from v0.8.15 to further versions
Describe the bug.: B-Table not working as expect after update from v0.8.15 to further versions, including the latest v0.9.26. I followed the docs and updated the code, but its not working as expected.
To Reproduce. :
1 .Initially our b-table code was like:
<b-table
v-model:busy="isBusy"
:items="items"
:fields="fields"
v-model:sort-by="sortBy"
v-model:sort-desc="sortDesc"
responsive="sm">
<template v-slot:cell(createdAt)="data">
{{ data.value }}
</template>
<template v-slot:cell(expires)="data">
{{ data.value }}
</template>
</b-table>
And then it would show table like:
| Created At | Expires |
|---|---|
| 20 Jan 2023 | 20 March 2023 |
| 1 Sept 2022 | Never |
- But now after the upgrade, its only showing the headers, value is not being shown. I modified the
b-tablecode as follows:
<b-table
:busy="isBusy"
:items="items"
:fields="fields"
v-model:sort-by="sortBy"
v-model:sort-desc="sortDesc"
responsive="sm">
<template v-slot:select-cell(createdAt)="data">
{{ data.value }}
</template>
<template v-slot:select-cell(expires)="data">
{{ data.value }}
</template>
</b-table>
This is the output:
| Created At | Expires |
|---|
Here, when i inspect the tbody, its empty.
Expected behavior: Expected to show the values.
Screenshots: Not necessary as no errors including typescript errors are thrown. Its just that no T-body i shown.
Environment:
- OS: Ubuntu 23.04
- Package Version: Starting from v0.9.0. (Last working was v0.8.15)
- Npm Version: npm@8.19.3
If I’m doing it wrong, I’m sorry, but please throw some light on this.
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 2
- Comments: 31 (7 by maintainers)
Even in the old Bootstrap-Vue, there were certain workarounds that you needed to perform in the case of async data loading. Two possible workarounds: -Set a
key:prop on the table, and bind it to a data member that you increment whenever your data refreshes -Add av-ifattribute to the table, and set it to a variable that evaluates to true when your data is loaded.I also have this problem. But I find the way to trigger this problem that when I add the sortable in fields, the data will missing. If there is no sortable prop, data will be displayed.
Changing the per-page value dynamically is also not working.
BTable stays at the initial value.
Next problem is, that the filter prop of BTable allows only strings. BootstrapVue (2) allows String, RegExp or Object. Especial the possibility to use an object allows to hand over complex filter settings from e.g. different select boxes to a provider function.
I used this possibility in most of my vue projects.
Nice that it works for you, but there are several users where it doesn’t work. we have been using the table for a long time, from 0.9.23 it no longer works without us having changed anything. I have 100 tables in my program, I can’t change them all!
I have exactly the same thing, please fix it as soon as possible, this is a megabug #1335