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

[AnalyticalTable > Subcomponents]: VirtualTableBody tries to update AnalyticalTable during its render #6755

Open
1 task done
Greggics opened this issue Dec 17, 2024 · 0 comments

Comments

@Greggics
Copy link

Describe the bug

On AnalyticalTable components with the renderRowSubComponent prop set, and the subComponentsBehavior prop set to "IncludeHeightExpandable" I get the following error message when I collapse a table row for the first time:

Cannot update a component (`AnalyticalTable`) while rendering a different component (`VirtualTableBody`). To locate the bad setState() call inside `VirtualTableBody`, follow the stack trace as described in https://react.dev/link/setstate-in-render

Note: This only happens the very first time you collapse a row since the last page load. Not even unmounting and remounting seems to trigger this error again. You have to refresh the page for the this error to occur again.

I also tried it with multiple AnalyticalTable components. The error seems to trigger the first time any of the tables rows is getting collapsed. It won't trigger on the other table anymore at that point.

Isolated Example

https://stackblitz.com/edit/github-ccdfvjhn?file=src%2FApp.tsx

Reproduction steps

  1. Open the example
  2. Open the Browser Development Tools
  3. Expand any of the rows
  4. Collapse a row of your choice
  5. Get error message in the console saying "Cannot update a component (AnalyticalTable) while rendering a different component (VirtualTableBody). To locate the bad setState() call inside VirtualTableBody, follow the stack trace as described in https://react.dev/link/setstate-in-render"
  6. The error will not occur anymore. Refresh the page and start again from (3.) to re-trigger the error.

Expected Behaviour

No response

Screenshots or Videos

No response

UI5 Web Components for React Version

2.5.0

UI5 Web Components Version

2.5.0

Browser

Chrome, Edge, Firefox

Operating System

No response

Additional Context

No response

Relevant log output

Organization

No response

Declaration

  • I’m not disclosing any internal or sensitive information.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant