Thanks to visit codestin.com
Credit goes to github.com

Skip to content

(documentation) DnD with custom Rule and RuleGroup #449

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

Closed
unrealsolver opened this issue Jan 10, 2023 · 3 comments Β· Fixed by #455
Closed

(documentation) DnD with custom Rule and RuleGroup #449

unrealsolver opened this issue Jan 10, 2023 · 3 comments Β· Fixed by #455

Comments

@unrealsolver
Copy link

By default, rqb/dnd will not work with custom Rule and RuleGroup. To make it work, controlElements should be added to QueryBuilderDnD instead of QueryBuilder component, like this:

<QueryBuilderDnD controlElements={controlElements}>
  <QueryBuilder
    query={query}
    // ...
    // Don't put 'controlElements' here!
  />
</QueryBuilderDnD>

I think it should be added into documentation, because it is not obvious and could not be figured out without debugging the library internals.
I can update the docs if this point makes sense.

@jakeboone02
Copy link
Member

Yeah, that's a good point. The docs probably need a dedicated DnD page anyway, but if you'd like to amend the current docs please feel free to submit a PR. Docs are in the /website/docs folder, and since this still applies to v5, also update /website/versioned_docs/version-5.

Thanks!

@jakeboone02 jakeboone02 linked a pull request Feb 10, 2023 that will close this issue
1 task
@jakeboone02
Copy link
Member

This will be addressed with a note in the documentation in v6.

@jakeboone02
Copy link
Member

@unrealsolver I just released v6.0.0 along with an update to the documentation regarding custom Rule and RuleGroup components when using QueryBuilderDnD.

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

Successfully merging a pull request may close this issue.

2 participants