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

[REACT] React component is not rendered correctly on expand / collapse #6987

Closed
marciogurka opened this issue Jun 12, 2023 · 2 comments
Closed
Assignees
Labels
bug Something isn't working forum Issues from forum premium react React framework integration resolved Fixed but not yet released (available in the nightly builds)
Milestone

Comments

@marciogurka
Copy link

marciogurka commented Jun 12, 2023

Forum post

"Hey there!

I'm defining a custom column renderer. Everything is fine on the first run of the renderer, but when the renderer runs a second time (after the tree node has been expanded), the value of data.record.visibleDescendantCount goes from 0 => 1, but the component never receives the newly passed props. Is this because the component is treated as a template, and not as a standard react component?

If so, how would I render an element that renders differently based on the context provided in arguments of the column renderer? i.e. where it looks one way when visibleDescendantCount = 0, and another when visibleDescendantCount = 1?"

Added a demo with the configuration shared by the user, if you check the video, the console.log shows the correct value, but the component is not correctly updated.

simple.zip

Bryntum.Scheduler.-.Simple.demo.React.-.12.June.2023.mp4
@marciogurka marciogurka added bug Something isn't working react React framework integration premium forum Issues from forum labels Jun 12, 2023
@lucasdellabella
Copy link

Hey Marcio, thanks for creating an issue. I've subscribed and am watching for updates 👍🏼

@matsbryntse matsbryntse added this to the 5.3.7 milestone Jun 13, 2023
@isglass isglass modified the milestones: 5.3.7, 5.3.8 Jun 13, 2023
@jsakalos
Copy link

The problem here is that the rendered React component is never made to re-run. It is caused by the fact that config, including columns and the renderer, is contained in state so never changing. I'm looking for a solution.

@SergeyMaltsev SergeyMaltsev modified the milestones: 5.3.8, 5.4.x, 5.4.1 Jun 28, 2023
@SergeyMaltsev SergeyMaltsev changed the title Updating react component in response to new renderer context not working [REACT] React component is not rendered correctly on expand / collapse Jul 10, 2023
@SergeyMaltsev SergeyMaltsev added resolved Fixed but not yet released (available in the nightly builds) and removed in progress BLOCKING labels Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working forum Issues from forum premium react React framework integration resolved Fixed but not yet released (available in the nightly builds)
Projects
None yet
Development

No branches or pull requests

6 participants