table icon indicating copy to clipboard operation
table copied to clipboard

SolidTable cells not reactive

Open emdede opened this issue 2 years ago • 2 comments

Describe the bug

If passed a Store which features granular reactivity, TanStack table cannot process changes. Is this by design or just not included? Clearly, this is mostly a React library but seeing that there is an offical SolidJS adapter and it is a rather straightforward use-case I am questioning if this really is a bug or whether I am doing something wrong?!

Your minimal, reproducible example

https://codesandbox.io/s/runtime-bird-l1mtgs?file=/src/App.tsx

Steps to reproduce

Edit one of the fields and watch the console. The effect that watches Store state changes triggers, but the new value does not propagate down to the cell. If the whole Data[] is replaced it works (either as a Signal or as a property of a Store object), but obviously it's something that should be avoided if possible.

Expected behavior

The internal cell value should update when the underlying Data[] changes.

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

Windows, Chrome

react-table version

8.7.9

TypeScript version

4.9.5

Additional context

No response

Terms & Code of Conduct

  • [X] I agree to follow this project's Code of Conduct
  • [X] I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

emdede avatar Feb 06 '23 17:02 emdede

I demo reactive cells in Solid-Table here https://github.com/TanStack/table/issues/5019#issuecomment-2634580600

AlexErrant avatar Feb 04 '25 18:02 AlexErrant

According to the SolidJS documentation (https://www.solidjs.com/docs/latest/api#createstore), "As proxies, store objects only track when a property is accessed."

g-mero avatar May 08 '25 01:05 g-mero