Skip to content
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

Cell attrs and props are not re-rendering tds reactively #2

Open
4 tasks done
lolcabanon opened this issue Apr 20, 2024 · 1 comment
Open
4 tasks done

Cell attrs and props are not re-rendering tds reactively #2

lolcabanon opened this issue Apr 20, 2024 · 1 comment
Assignees
Labels
help wanted Extra attention is needed
Milestone

Comments

@lolcabanon
Copy link
Owner

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

  • Initial values are applied with success (play with config to see)
  • Derived callbacks re-run as expected (recompute props and attrs) when the columnsAlignments store is updated by toggle
  • props and attrs are correctly computed for ths and tds (console.log() in the .update() callback show correct values)
  • Tried with {#key} blocks on many values, but nothing seems to trigger a re-render for the table body
@lolcabanon lolcabanon added the help wanted Extra attention is needed label Apr 20, 2024
@lolcabanon lolcabanon added this to the v1 milestone Apr 20, 2024
@lolcabanon lolcabanon self-assigned this Apr 20, 2024
@lolcabanon
Copy link
Owner Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant