Replies: 1 comment
-
Before I dive into your code, have you taken a look at #515? It links to a sandbox that implements a nested query builder, but it uses RQB v6.3.0. Here's an updated sandbox using RQB v8.1.0: https://codesandbox.io/p/devbox/q6jr4c?file=%2Fsrc%2FCustomRule.tsx. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I’m trying to use a QueryBuilder component as a ValueEditor in another QueryBuilder. However, I’m encountering an issue where the nested QueryBuilder causes multiple rerenders, and I get the following errors:
Uncaught Error: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops
Uncaught Error: Objects are not valid as a React child (found: [object Object]). If you meant to render a collection of children, use an array instead.
Here’s my implementation for the nested QueryBuilder as a custom ValueEditor:
And here’s the parent QueryBuilder setup:
The error occurs when I add
props.handleOnChange
foronQueryChange
.Questions:
Any insights or suggestions would be greatly appreciated. Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions