m-a-k-o / nova-custom-table-card

Simple Nova Card for Custom Tables
MIT License
46 stars 26 forks source link

feat/Add sortable functionality #28

Closed gassius closed 3 years ago

gassius commented 3 years ago

This PR adds a sortable functionality to the package. It allows setting the sortable property for header's Cell objects to allow the sorting of a column. (Examples added to the README.md). It uses the SortableIcon Vue component from Laravel Nova (available as global Vue component) and the InteractsWithQueryString mixing from the laravel-nova package to keep the same UX/UI of the main package.

Also included the optional sortableData property to the Cell objects that allows to define a different value for display and sorting.

gassius commented 3 years ago

@m-a-k-o any feedback?

m-a-k-o commented 3 years ago

@gassius Sorry for late feedback.

Merged and released as https://github.com/m-a-k-o/nova-custom-table-card/releases/tag/3.3.0.

m-a-k-o commented 3 years ago

Thank you for your contribution 👌