AgnosticUI / agnosticui

AgnosticUI is a set of UI primitives that start their lives in clean HTML and CSS. These standards compliant components are then copied to our framework implementations in: React, Vue 3, Angular, and Svelte.
https://agnosticui.com
Apache License 2.0
723 stars 47 forks source link

[Svelte] Table wont update on new data when sorted #193

Closed Croug closed 2 years ago

Croug commented 2 years ago

Describe the bug In Svelte when new data is provided for the table while it is sorted, instead of the new data rendering, it renders the old data

To Reproduce Steps to reproduce the behavior:

  1. Create a table with data
  2. Sort any of the columns
  3. Provide the table with new data

Expected behavior The table should render the new data

roblevintennis commented 2 years ago

Good find 👍🏽

Should this be an opt-in or opt-out'able prop? I could see a case for one time eagerly loaded data where you may not want the data fully reloaded each time. Thoughts?

Croug commented 2 years ago

So how would that look? In my mind, if you don't want to reload the data you would manage that yourself by controlling what data goes into the rows property, but maybe I'm missing a use case here

roblevintennis commented 2 years ago

Ok per our discussion we won't worry about the edge case I mentioned and as you put it that's probably something the consumer can control anyway. THanks for thinking that through with me and helping me understand. PR merge so closing this out -- as always thank you so much of your contributions @Croug