I've read #590 but don't really understand the outcome. However, at some point in that discussion, I think @jbetancur asked what the use case is. My use case is this: I have this kind of crazy but very useful nested data table:
Because of the nesting, sorting has to be done at each indent level, and I do that through my initial sorting of the data and I set sortable: false on all columns. However, sometimes the user does want to sort, so I allow them to turn nesting off and then the columns toggle to sortable: true. But when they turn nesting back on, the table stays sorted, which means the nesting makes no sense:
I would just like to tell the table to go back to it's initial state. I tried forcing a rerender by replacing data with a copy ([...data]), but that's not doing anything.
In writing this issue, I did figure out a klunky workaround: in my event handler for toggling nesting back on, window.location.reload().
So, maybe I misunderstood and there's already a way to do this without that workaround, or maybe this use case is argument enough for implementing a reset feature, but, with the workaround, it's not a dire situation for me.
Thanks for the component! It's helped me a lot over the years.
I've read #590 but don't really understand the outcome. However, at some point in that discussion, I think @jbetancur asked what the use case is. My use case is this: I have this kind of crazy but very useful nested data table:
Because of the nesting, sorting has to be done at each indent level, and I do that through my initial sorting of the data and I set sortable: false on all columns. However, sometimes the user does want to sort, so I allow them to turn nesting off and then the columns toggle to sortable: true. But when they turn nesting back on, the table stays sorted, which means the nesting makes no sense:
I would just like to tell the table to go back to it's initial state. I tried forcing a rerender by replacing data with a copy (
[...data]
), but that's not doing anything.In writing this issue, I did figure out a klunky workaround: in my event handler for toggling nesting back on,
window.location.reload()
.So, maybe I misunderstood and there's already a way to do this without that workaround, or maybe this use case is argument enough for implementing a reset feature, but, with the workaround, it's not a dire situation for me.
Thanks for the component! It's helped me a lot over the years.