-
-
Notifications
You must be signed in to change notification settings - Fork 265
Description
Situation:
I have Carbon Tabs. In each tab i render a DataTable.
That table can contain different number of columns (DataTableHeaders).
See: https://mybram.com/ and switch between Work tab (five columns) and Personal tab (three columns).
Since Svelte 5.38.2 switching between Work and Personal tabs causes DataTable to crash.
Problem determination:
When the number of DataTable columns (DataTableHeader) changes (eg. from five headers to three columns) when the component rerenders, the DataTable component crashes.
This happens only happens when i render the DataTable at the moment that i select another tab. When i render all tabs at once it does not crash. I guess this has to do with how Svelte Component Lifecycle works with reactivity.
As this is hard to explain, see reproduction below.
Reproduction:
See playground: https://svelte.dev/playground/b281263c84d5440f9e9203a16edd4f4a?version=5.36.0 and follow instructions.
Additionally:
On my local machine this started since Svelte 5.38.2.
On the playground this started since Svelte 5.36.0
The playground is a simplified version of my application. In my application i get into an indefinite loop with many errors. That might be because that DataTable is handling more data and is more complex. But that loop looks like a race condition problem, though i'm not sure. That said, in think the behaviour of the simplified version on playground is the root of the problem.