Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MdTable] Table Select-All Issue #1348

Closed
SirNeural opened this issue Dec 27, 2017 · 3 comments · Fixed by #1358 or #1674
Closed

[MdTable] Table Select-All Issue #1348

SirNeural opened this issue Dec 27, 2017 · 3 comments · Fixed by #1358 or #1674
Labels

Comments

@SirNeural
Copy link

SirNeural commented Dec 27, 2017

Steps to reproduce

Create table with elements that can be sorted by id and other types, and sort them in a way that breaks the linearity of the id numbers. Once the select all checkbox is clicked, only some are selected.
Edit - There seems to be a litany of issues with select all, the same issue also appears and is reproducable in the codepen below with many other cases,

  • By searching for specific elements and selecting all, not all are selected (e.g. search for 't' and try to select all elements https://i.imgur.com/YHyIUlS.png
  • Exit out of that search and again try to select all on all elements, all of a sudden a few elements are not selected when clicking the select all. https://i.imgur.com/3ELZgb2.png

Which browser?

Vue-Material@^1.0.0-beta-7
Vue@^2.5.0
Electron@1.7.10

What is expected?

It should select all elements regardless of id order

What is actually happening?

I believe it is using the id's to decide which elements to select, and when it encounters out of order id's it goes off.

Reproduction Link

https://codepen.io/anon/pen/RxKMxW
Selecting all when sorted by id works fine, but when sorting by name or anything else that breaks the order of the ID column, not all elements are selected, only around half. https://i.imgur.com/pSTfj6N.png

@VdustR VdustR added the bug label Dec 27, 2017
marcosmoura pushed a commit that referenced this issue Dec 29, 2017
* fix(MdTable): multiple selection with table sorting

an easy way to handle multiple selection

fix #1348

* refactor(MdTable): single selection using instance comparing instead of id comparing

both `MdTable` and `MdTableRow` emit `md-selected` event to avoid breaking change

* feat(MdTable): new props `:md-selected-value.sync` for reactive selection

fix #1292

* fix(MdTable): `syncSelectedValue` without `mdSelectedValue` in multiple selecting mode

* fix(MdTableHeadSelection): fix `allSelected`, now disabled row could be tick from `md-selected-value

* fix(MdTableRow): remove `md-selected` event

too many duplicated events on a selection. It should be emit from `MdTable`

BREAKING CHANGE: no more `md-selected` event from `MdTableRow`

* fix(MdTable): select event should be triggered after select update event

* fix(MdTableHeadSelection): select all only take effect on selectable items
@SirNeural
Copy link
Author

Hi,
I see that the bug fix that fixed this issue was merged into beta-8, and I checked to see if my problem was fixed; Using the sort to sort ids out of order and then selecting works now, but while searching and then selecting elements, either not all, or more elements than were shown in the search results are selected.

This is a screenshot I got from the codepen posted above, updated to use the new beta-8
https://i.imgur.com/R609U8z.png
https://codepen.io/anon/pen/RxKMxW

Could you guys look into this?

Thanks a lot!

@VdustR
Copy link
Member

VdustR commented Jan 31, 2018

@SirNeural :

Would you fix your production for missing method getAlternateLabel?

@marcosmoura:

I tried to remove this abstract to make it work

It's seems that abstract is not documented. Is it a vue.js bug or should it be removed?

vuejs/vue#7571

@SirNeural
Copy link
Author

@VdustR heres the updated codepen
https://codepen.io/anon/pen/zRGema

@VdustR VdustR reopened this Feb 19, 2018
marcosmoura pushed a commit that referenced this issue May 13, 2018
* fix(MdTable): reactive selection

fix #1348

* fix(MdTableRow): add addSelectableItem on nextTick to avoid destory after created

* fix(MdTable): mdModelId necessary warning

* fix(MdTableCellSelection): replace created with watch immediate

* fix(MdTable): fix warn message

* fix(MdTable): Generate UUID by object instance with WeakMap to avoid breaking change

* fix(MdTable): remove unused Vue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment