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

feat(MdTable): reactive selection #1358

merged 8 commits into from Dec 29, 2017


None yet
3 participants
Copy link

commented Dec 29, 2017

BREAKING CHANGE: no more md-selected event from MdTableRow because of too many duplicated events on a selection. It should be emitted only from MdTable both in single and multiple selecting mode. It was emitted from MdTableRow in single and from MdTable in multiple before.


new props :md-selected-value.sync for reactive selection.

  <md-table v-model="people" md-card md-sort="name" :md-selected-value.sync="selected" @md-selected="onSelected">

Notice that disabled row could be selected from :md-selected-value.

fix #1292

Refactor & fix

MdTable.selectedItems, MdTable.selectable change type to array for easier selection controlling.

Selection is determined by instance comparing now.

It was determined by comparing ids in single selection mode and comparing indexes in multiple selection mode before. The indexes way is not sorting the checkbox while sorting because the item is change and index is not. And it could also make duplicated items in selectedItems or selectable.

fix #1348

VdustR added some commits 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
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`

@VdustR VdustR changed the title feat(MdTable): reactive feat(MdTable): reactive selection Dec 29, 2017

@marcosmoura marcosmoura merged commit 906a91d into vuematerial:dev Dec 29, 2017

3 of 5 checks passed

codeclimate/diff-coverage 0% (50% threshold)
codeclimate/total-coverage 34% (-0.2% change)
codeclimate All good!
continuous-integration/travis-ci/pr The Travis CI build passed
deploy/netlify Deploy preview ready!

@VdustR VdustR deleted the VdustR:fix_table_selection branch Dec 29, 2017


This comment has been minimized.

Copy link

commented Jul 19, 2018

Reactivity is a bit weird it only works after next tick... should be built in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.