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

Table2 column header does not re-render correctly on size change #5936

Open
nurseiit opened this issue Feb 10, 2023 · 3 comments
Open

Table2 column header does not re-render correctly on size change #5936

nurseiit opened this issue Feb 10, 2023 · 3 comments

Comments

@nurseiit
Copy link
Member

Code Sandbox

Link to a minimal repro (fork this code sandbox): https://codesandbox.io/s/gallant-tree-hch623?file=/src/index.tsx

Steps to reproduce

  1. create a basic Table2 with columnHeaderCellRenderer that changes its height depending on some state
  2. update state and observe that the header size is not re-rendered correctly

(even if the dependency's added to the cellRendererDependencies prop)

Actual behavior

Columns header changes its height, but does not reposition any other row or columns.

Expected behavior

Should reposition all cells / headers upon size change.

Possible solution

TBD

@nurseiit
Copy link
Member Author

Hi @adidahiya, any ideas which direction should I take to fix this? Any specific methods of Table2?

@vhellem
Copy link
Contributor

vhellem commented Feb 16, 2023

This issue actually seem's to extend to anything on Table2 not changing when certain props changes. I've extended the repro above to also change what data should be displayed, but this doesn't seem to rerender
https://codesandbox.io/s/quirky-gould-dxoxq9?file=/src/index.tsx

@adidahiya
Copy link
Contributor

@vhellem there was a bug in that sandbox you just linked. You need to use dataToShow in the cell renderer. Once you do this, it does re-render cell contents when cellRendererDependencies change. Fixed in this forked sandbox:

2023-02-16 08 14 56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants