lolcabanon / add-aligned-columns

`addAlignedColumns` plugin for svelte-headless-table
1 stars 0 forks source link

Cell `attrs` and `props` are not re-rendering `td`s reactively #2

Open lolcabanon opened 4 months ago

lolcabanon commented 4 months ago

Problem

When a column alignment change, the corresponding th update, but all td stays the same.

Repro

  1. Run the project (pnpm dev) and navigate to http://localhost:5173/simpletable
  2. Click on alignment buttons on any columns
  3. th alignment changes, but tds are stuck in initial state

Troubleshoot

lolcabanon commented 4 months ago

Hey @bryanmylee, this is the repo for the plugin I submitted a PR for earlier (couple weeks ago) on svelte-headless-table.

I'm currently stuck on this issue, either I don't understand derived stores, or there is something weird happening... I know you wrote you don't have a lot of time, but if by any chance you have any insight on this, I'd be very grateful!

I looked at your code, mostly the addResizedColumns() plugin that has a similar logic (apply and update inline style in reaction to events), and nothing seems to be too different... It's bugging me so much!