@react-querybuilder/antd
Advanced tools
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.Changelog
[v7.2.1] - 2024-05-06
parseCEL
processes "like" operators ("contains"/"startsWith"/"endsWith") that are negated without parentheses, like !f1.contains(f2)
.formatQuery
updates (these are probably technically breaking changes, but the logic itself is equivalent to the previous version so we're considering them bug fixes):
quoteFieldNamesWith
option.field
property to an arbitrary value without throwing an error, even if the value is not included in the fields
prop list.Changelog
[v7.2.0] - 2024-04-15
formatQuery
caused rules to be ignored when the operator was "between" or "notBetween" and one of the values was falsey without being null
or undefined
(e.g, 0
or ""
).Changelog
[v7.1.0] - 2024-04-01
useQueryBuilderSelector
, props.schema.getQuery()
, and props.schema.dispatchQuery()
), the hooks useQueryBuilderDispatch
and useQueryBuilderStore
are no longer exported.controlClassnames
properties. These classnames augment—rather than replace—the classnames defined for specific controls.
actionElement
: Applied to all action elements like addRuleAction
, addGroupAction
, etc.valueSelector
: Applied to all selection elements like combinatorSelector
, fieldSelector
, etc.numberedParams
option for formatQuery
. When the format is "parameterized"
, parameter placeholders within the generated SQL string will begin with the configured paramPrefix
(default ":") followed by a numbered index beginning with 1
instead of using "?" as the placeholder for all parameters. This option was added primarily to reduce the code necessary for generating PostgreSQL-compatible SQL.
formatQuery
now passes a third parameter to custom ruleProcessor
functions when the format is "parameterized" or "parameterized_named". Currently the parameter is an object with a single property, processedParams
, which represents the current state of the params
array (for the "parameterized" format) or object (for the "parameterized_named" format) at the point the rule processor is invoked during query processing. The default ruleProcessor
for the parameterized formats uses this parameter when the numberedParams
option is true
.generateID
when crypto.randomUUID
is not available. This led to performance improvements in initial <QueryBuilder />
rendering and query update functions.Changelog
[v7.0.2] - 2024-03-12
@react-querybuilder/antd
uses AntD's InputNumber
in AntDValueEditor
when valueEditorType === "number"
.formatQuery
now respects the ruleProcessor
option for "parameterized" and "parameterized_named" export formats.start:*
scripts for compatibility packages now correctly load their particular dependencies (does not affect execution).Changelog
[v7.0.1] - 2024-03-07
react-querybuilder/parseSpEL
.