vuematerial / vue-material

Vue.js Framework - ready-to-use Vue components with Material Design, free forever.
https://www.creative-tim.com/vuematerial
MIT License
9.89k stars 1.16k forks source link

Documentation site should use md-selected-value.sync instead of md-selected #2045

Open awestlake87 opened 5 years ago

awestlake87 commented 5 years ago

Steps to reproduce

Vue Material v1.0.0-beta-10.2

The documentation site still has a snippet for multiple select using md-selected, which, according to issue #1504 is no longer the recommended attribute.

If you play with the multiple selection example here, it doesn't work quite right. More specifically, if you select a single row, the md-selected event does not get emitted immediately. I was about to file a bug until I saw issue #1504 and tried md-selected-value.sync instead. I'm glad it's fixed, but I had to do some digging to find the solution.

I'm willing to update the docs, but I have never contributed to this project before, so it may take some time to get acclimated to the codebase. It seems like a simple fix, though.

Which browser?

All browsers I've tried

What is expected?

Since md-selected-value.sync seems to work exactly like I wanted, I think the documentation just needs to be updated.

What is actually happening?

The code example only has the md-selected event on it.

Reproduction Link

Multiple select example at https://vuematerial.io/components/table

chrislebaron commented 5 years ago

+1 on this. I have a table that needed to be able to select multiple rows triggered by a specific row getting selected. Had to dive into the code, and found the md-selected-value that I didn't find in the example for multi-select. Glad this was here or I wouldn't have found md-selected-value.sync that makes it so I can watch for changes and make updates to other checkboxes.