Synphonyte / leptos-struct-table

Easily create Leptos table components from structs
Apache License 2.0
164 stars 24 forks source link

Disabling multi-column sorting possible? #24

Closed oddlama closed 5 months ago

oddlama commented 6 months ago

Is there a way to disable multi-column sorting? I have some data that users will always want to sort by one column only. I'd like to always force sorting by the column that was clicked, and reset the sorting automatically if another column is selected. So basicaly what you'd see on most websites that show tabular data.

I could probably implement this manually by passing my own sorting RwSignal and overriding each table header click function, but I am not sure if there already exists something to achieve this.

maccesch commented 6 months ago

There is no possibility right now to do that but it's a good feature request. I'll mark it and implement it as soon as I can, which unfortunately might take a while. I'm willing to accept a PR also 😉