bryanmylee / svelte-headless-table

Unopinionated and extensible data tables for Svelte
https://svelte-headless-table.bryanmylee.com/
478 stars 31 forks source link

Re-rendering addResizedColumns BUG #218

Open MiguelBizzi opened 4 months ago

MiguelBizzi commented 4 months ago

I'm having trouble with re-rendering the table. When the components re-renders the resize bugs and set all columns to big numbers

image

Im the code above, I use a variable to control the table display, but when hidding and showing it the columns width gets really big. Debuging I saw that $columnWidths get's random numbers every time.

image

chbert commented 1 month ago

@MiguelBizzi I have a similar issue, did you find a solution?

chbert commented 1 month ago

Found the solution in my case: https://svelte-headless-table.bryanmylee.com/docs/plugins/add-resized-columns#reset-action

bryanmylee commented 1 month ago

Unfortunately the resize plugin can be quite finicky. I'm not sure why it's causing the sudden jump in size, but I'd appreciate any help debugging it!