FE-Driver / vue-beauty

Beautiful UI components build with vue and ant design
https://fe-driver.github.io/vue-beauty
MIT License
2.11k stars 249 forks source link

BUG: checkAllState is true initially #261

Open KrishnaPG opened 6 years ago

KrishnaPG commented 6 years ago

The below code returns true when rowSelectionStates is undefined or empty initially https://github.com/FE-Driver/vue-beauty/blob/63edb069219925fff35194ab838271a597a4b8b1/vb/components/data-table/data-table.vue#L1038

This is causing the check all button to be set to true on the load, even through there are no selections. Check below screenshot.

image

yuu2lee4 commented 6 years ago

i need more info like browsersystem

KrishnaPG commented 6 years ago

Well, I believe the if else condition that is causing this bug executes same in all browsers. The screenshot above was taken from Chrome latest on Windows 10.

However, IMO, problem in this line of code is browser/system independent and gives same result across all https://github.com/FE-Driver/vue-beauty/blob/63edb069219925fff35194ab838271a597a4b8b1/vb/components/data-table/data-table.vue#L1040