Skip to main content

useQueryBuilderQuery()

useQueryBuilderQuery(props?: { schema: { qbId: string; }; }): RuleGroupTypeAny

Retrieves the full, latest query object for the nearest ancestor QueryBuilder component.

The optional parameter should only be used when retrieving a query object from a different QueryBuilder than the nearest ancestor. It can be a full props object as passed to a custom component or any object matching the interface { schema: { qbId: string } }.

Must follow React's Rules of Hooks.

Parameters

ParameterType
props?{ schema: { qbId: string; }; }
props.schema?{ qbId: string; }
props.schema.qbId?string

Returns

RuleGroupTypeAny

Defined in

packages/react-querybuilder/src/redux/hooks.ts:37


caution

API documentation is generated from the latest commit on the main branch. It may be somewhat inconsistent with official releases of React Query Builder.