MicroDroid / vue-materialize-datatable

A fancy Materialize CSS datatable VueJS component.
https://overcoder.dev/vue-materialize-datatable
MIT License
179 stars 67 forks source link

fix rows_per_page error #48

Closed cssailing closed 4 years ago

cssailing commented 4 years ago

fix the error of rows_per_page select all option value -1 option === -1

MicroDroid commented 4 years ago

I haven't tested the fork yet but what does this exactly fix? I suppose this merely breaks the component instead of fixing anything. :thinking:

cssailing commented 4 years ago

when you have select the option all, the option value will be -1, fixed the value option as :value="option === -1 ? rows.length : option" make the all select work

cssailing commented 4 years ago

you can view the demo-Custom pagination table, select show all, report errors

MicroDroid commented 4 years ago

Alright I'll check this out in a moment.

MicroDroid commented 4 years ago

Thanks for your effort in making this PR, however, I opted into a slightly different solution to cover some other edge cases that can occur in the 5e2d1aeee5b562a568a941da3ad603289e5d10aa

:tada: