-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[MdTable] on md-selectable="multiple", @md-selected doesn't reliably fire #1786
Comments
assign value instead of mutate value to avoid unexpected behavior fix #1786
Hi, i still have the problem: |
this is already fixed on dev branch i think it is this change (this.$nextTick) in MdTable.vue syncSelectedValue () {
this.$nextTick().then(() => { // render the table first
if (this.MdTable.selectingMode === 'single') {
this.MdTable.singleSelection = this.mdSelectedValue
} else if (this.MdTable.selectingMode === 'multiple') {
this.MdTable.selectedItems = this.mdSelectedValue || []
}
})
} see also the change in watch value () {
this.syncSelectedValue()
this.setWidth()
} hope that helps |
As you can see here: https://codesandbox.io/s/o7n643p6zq?module=package.json, the sample code has been configured to use the dev branch. I have also tested in a local environment (experiencing the same problem) and the
|
ok, i tested it with |
@Samuell1 This issue seems to be duplicated a lot, but this answer (which works!) took a bit of searching to get to. Could you build dev branch so we don't have to fork this just to build it? |
Hi, how about this issue ? |
Steps to reproduce
ISSUE 1
open https://codesandbox.io/s/lrz0np1m0q in a new tab(needs to be fresh)
select 1 row
notice the selected row isn't displayed below(incorrect behavior)
unselect 1 row
select 1 row
notice the selected row is displayed below(expected behavior)
ISSUE 2
open https://codesandbox.io/s/lrz0np1m0q in a new tab
open dev tools
select 1 row
notice that there is no console log(incorrect behavior)
unselect row
notice that there is a console log(expected behavior)
Which browser?
Latest Chrome, Windows 10
The text was updated successfully, but these errors were encountered: