-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix table grouping #2904
Fix table grouping #2904
Conversation
This flag doesn't get updated when the underlying data is changed. Removing it seems to fix tables not showing updated data on component changes.
Thank you for your contribution! No problems in CI here. Are you able to create a simple story to test this functionality? |
I'm not sure about a story (I assume it's an automated test for the component, right?). Is there a way to change an input through a story? |
It's more a playground so you can set up the component with context and then check it delivers the expected behaviour. I assume to confirm this works, you need a grouped table wired up to an input that filters it? |
Ok, let me see what I can do. Is there a way to set the expected output? |
We use Chromatic which takes screenshots of our components and then compares them to ensure nothing changes unless its meant to. So the "expected output" will be whatever the result of your story is, and will be validated on every PR going forward. |
Sorry for the slow response. Here's the thing. I don't think I can write a story for this because the bug appears only after the table is rendered and an input is changed. See this for a minimal reproduction page using the template database:
Here is a visual: The Is there a way to code a change in a dropdown in a story? |
It’s enough to just set it up i think.
In this case you (and we) can verify the fix by manipulating the story in the browser
|
Added Chromatic Group by FilterData Story Screen.Recording.2024-12-20.161719.mp4 |
Looking at the UI test, one of the groupBy Sort test failed, did not sort the group by column properly. I'll look into this, but the removal of the prop seems to have fixed the dataTable groupBy with filtered Data |
Thank you for the storybook update. I didn't account for the new group sorting behavior. I'll also take a look after Christmas if it's still open. |
I pushed an update. It looks like moving the grouping logic before the sorting block fixes the grouped sorting. Let's see if all the tests pass now. |
…ndle filtered data input changes
Russia doesn't sort into ascending or descending in Europe Group Screen.Recording.2024-12-30.160554.mp4Looking into the code, the A change I found that helped is adding a check for when data changes to update the Filtered Data from Input Screen.Recording.2024-12-30.155101.mp4Group Sorting Still Works Screen.Recording.2024-12-30.155751.mp4 |
packages/ui/core-components/src/lib/unsorted/viz/table/_DataTable.svelte
Outdated
Show resolved
Hide resolved
packages/ui/core-components/src/lib/unsorted/viz/table/DataTable.stories.svelte
Outdated
Show resolved
Hide resolved
The chromatic test Looks good, no new changes to sorting, and filtering data behavior looks solid Merging @ebardelli Thanks for your contribution! |
Description
This PR removes the
groupDataPopulated
flag from_DataTable
. This flag wasn't updated when thedata
object was modified, leading to the DataTable being frozen after the first execution, making grouped DataTables non-interactive.Closes #2850
Checklist