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

Sortable on a th, td manually defined fields #61

Open dwhudson opened 3 years ago

dwhudson commented 3 years ago

I think I'm close but it blows up the page when I apply :sortable in the wrong place. With the below code I've been able to get the two manually defined columns to work. The problem now is getting sortable to work with my date column. I've tried adding :sortable=true, :sortable="true" to the & but no luck. Since I've created the rows and columns in the template it doesn't let me do anything with it in the data() section of vue. Potentially I'm thinking props.columns.updatedOn.sortable might be the direction to go. Anyone have thoughts on how to get the Updated column to sort? Thanks again.

https://jsfiddle.net/bismarck611/tmh5k32x/ `

Updated Actions

`

MicroDroid commented 3 years ago

A sortingFunc property in columns would be a good idea.