@react-querybuilder/native
Advanced tools
Changelog
[v7.6.0] - 2024-07-11
onMoveRule
and onMoveGroup
, called before a rule or group is moved (via drag-and-drop) or shifted. If the result of the callback is false
, the move will be cancelled. If true
, the move will proceed as normal. Alternatively, a full query object can be returned representing the new state if some other modifications were necessary.onAddRule
and onAddGroup
callbacks can now return true
instead of the entire rule/group to allow the addition to proceed as normal.parseSpEL
was not handling the matches
operator correctly when its value was a single character.formatQuery
"elasticsearch" output for "contains" and "doesNotContain" operators.Changelog
[v7.5.2] - 2024-06-27
parseMongoDB
was not handling the $regex
operator correctly when its value was a single character.Changelog
[v7.5.1] - 2024-06-25
useMergedContext
no longer returns values that are not explicitly typed in UseMergedContextProps
.key
is no longer required in the parameter passed to getCompatContextProvider
.dragging
property of the object passed to canDrop
is no longer a stale reference to the rule/group being dragged.Changelog
[v7.5.0] - 2024-06-15
gap
for layout spacing, which means the minimum react-native
version is now 0.71.0
.useQueryBuilder
hook has been reinstated. It does nothing more than call useQueryBuilderSetup
and useQueryBuilderSchema
, which no longer need to be called from separate components.useQueryBuilderQuery
hook to retrieve the full, current query object during the render pass of a custom component. It requires no parameters and should be used in place of the previously recommended hook useQueryBuilderSelector
, which requires a selector function generated with getQuerySelectorById(props.schema.qbId)
. While useQueryBuilderSelector
is not deprecated, it is no longer recommended except in very special circumstances.useQueryBuilderSelector
no longer returns undefined
during the first render pass (and neither does the new hook useQueryBuilderQuery
).parse*
methods properly escape commas in string values for "between" and "in" operators.Changelog
[v7.4.4] - 2024-06-10
JSON.stringify
.Changelog
[v7.4.3] - 2024-06-06
react-querybuilder
dependency version.Changelog
[v7.4.2] - 2024-06-06
insert
utility method to insert a new rule or group anywhere in the query hierarchy. insert
is similar to add
except that the new rule or group can be inserted at any path (add
can only append a rule or group to the end of a group's rules
array). The option replace: true
will replace the rule or group at the specified path.@react-querybuilder/dnd
now supports dragging and dropping rules and groups across separate query builders. As with drag-and-drop within a single query builder, holding the modifier key (Alt
on Windows/Linux, Option ⌥
on Mac) when dropping the rule/group will copy it instead of move it.debugMode
now logs the query builder's qbId
.parseJsonLogic
can now override group operations ("and", "or", "!", and "!!") with the jsonLogicOperations
option.Changelog
[v7.4.1] - 2024-06-04
parseJsonLogic
no longer nests negated groups unnecessarily.Changelog
[v7.4.0] - 2024-05-27
independentCombinators
property has been removed from the InlineCombinatorProps
interface. The value can be still be retrieved from the schema
prop.controlElements
prop can be set to null
. Properties set to null
will be rendered as () => null
.parseCEL
no longer creates a rule group with not: true
when parsing a single rule in a negated parenthetical group. Instead, the rule operator is inverted.enableDragAndDrop
is true
and a rule or group is dragged over an inline combinator (such as generated when showCombinatorsBetweenRules
is enabled or the query uses independent combinators), the "drop location" indicator (a dashed, purple line by default) will appear above the inline combinator. Previously the styles placed the indicator line below the inline combinator, which could be misleading, particularly for independent combinators.Changelog
[v7.3.0] - 2024-05-13
displayName
is no longer explicitly declared for any components.baseField
, baseOperator
, baseCombinator
props. Properties defined in these props will be applied to each option in the fields
, operators
, and combinators
lists, respectively. Corresponding properties defined for individual options will override the "base" properties.parseJSONata
, an experimental JSONata parser.quoteValuesWith
option for formatQuery
(applicable to "sql" format only). Values will be bracketed by the provided string, e.g. double quotes ('"'
), instead of the default single quotes.