bootstrap-vue-next icon indicating copy to clipboard operation
bootstrap-vue-next copied to clipboard

BTable selected-items issues

Open makroxyz opened this issue 1 year ago • 1 comments

Describe the bug

BTable and v-model:selected-items has some issues

  • when table items changes (for example using a provider property that paginates items)
  • when selected-items have a pre-selection

for example using provider that paginates, switching a page will loose the selected color on table. The primaryKey property solves the table selection issue BUT the select-mode 'single' doesn't work in any case

At the end items inside the BTable are not the same even if they are the same object...

Reproduction

https://stackblitz.com/edit/github-xfblxu?file=src%2Fcomponents%2FComp.vue,src%2FApp.vue

Used Package Manager

pnpm

Validations

  • [X] Have tested with the latest version. This is still alpha version and sometime things change rapidly.
  • [X] Follow our Code of Conduct
  • [X] Read the Contributing Guide.
  • [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • [X] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • [X] The provided reproduction is a minimal reproducible of the bug.

makroxyz avatar May 01 '24 07:05 makroxyz

I'd need a reproduction for both, using a provider and using this pre-selection. I'm confused as to what you're trying to do and what is expected

I do see that when using ref('id') that you can't disselect the first value. Which is an issue. Similarly using a bad pkey would cause other issues, which doesn't seem like a 'bug'.

VividLemon avatar May 04 '24 18:05 VividLemon

The given reproduction works after #1877 . The other issues mentioned do not have a reproduction. Closing

VividLemon avatar May 16 '24 18:05 VividLemon