@react-querybuilder/bulma
Advanced tools
Changelog
[v4.2.5] - 2022-05-12
translations
prop: fields.placeholderLabel
and fields.placeholderGroupLabel
. These will be used in place of the default "------"
when the autoSelectField
prop is set to false
.Changelog
[v4.2.4] - 2022-05-12
parseNumbers
option for formatQuery
.debugMode
prop on <QueryBuilder />
.Changelog
[v4.2.2] - 2022-03-12
RuleGroupTypeIC
, etc.).Changelog
[v4.2.1] - 2022-03-03
operator
parameter to the comparator
function property of the Field
interface.Changelog
[v4.2.0] - 2022-02-02
formatQuery
with the "mongodb" format and a custom valueProcessor
, the valueProcessor
function will now need to return the full expression object and not just the operator/value portion. For example, defaultMongoDBValueProcessor('firstName', '=', 'Steve')
previously returned {"$eq":"Steve"}
, but now returns {"firstName":{"$eq":"Steve"}}
.react-querybuilder
v4 within an application that already implemented react-dnd
, an error would appear: "Cannot have two HTML5 backends at the same time." This can now be resolved by using the <QueryBuilderWithoutDndProvider />
component instead of <QueryBuilder />
. They are functionally the same, but the former allows (in fact, relies on) a react-dnd
backend (e.g. react-dnd-html5-backend
) to be implemented higher up in the component tree.parseSQL
method would accept boolean comparison clauses with an identifier (field name) on the left or right of the operator, but not on both sides (at least one side had to be a primitive string, numeric, or boolean). If the identifier was on the right, parseSQL
would flip the clause so that the field name was on the left and the value on the right, but it wouldn't flip the operator (<
should become >
, etc.). The operator will now be flipped when appropriate.<ValueEditor />
component can now display a filterable list of fields from the fields
prop given the right configuration. formatQuery
and parseSQL
have also been updated to support this feature.<QueryBuilder />
element:
add
- appends a new rule or group (and a preceding independent combinator if appropriate) to the end of a rule group's rules
arrayremove
- removes a rule or group (and the preceding independent combinator if one exists)update
- updates a property of a rule or group, or updates an independent combinatormove
- moves (or clones, with new id
and path
) a rule or group to a new location in the query treeshowLockButtons
prop to enable locking/unlocking (i.e. disabling/enabling) individual rules and groups (demo).valueEditorType
and inputType
options: In addition to the previously available options ("text", "select", "checkbox", "radio"), the following new options are now officially implemented in the default <ValueEditor />
and all compatibility packages:
valueEditorType
inputType
fields
prop can now accept an object of type Record<string, Field>
. (Field[]
and OptionGroup<Field>[]
are still supported.)controlElements
prop (as well as controlClassnames
in the case of Bootstrap). No need to assign each component individually anymore.Changelog
[v4.1.3] - 2022-01-18
RuleGroupArray
type (used for the rules
property of RuleGroupType
) has been simplified to (RuleType | RuleGroupType)[]
. This should make it easier to extend and/or narrow RuleGroupType
.Changelog
[v4.1.2] - 2022-01-12
parseSQL
was returning conventional rule groups (combinators at the group level) in some situations even when the independentCombinators
option was set to true
. The option will now guarantee a return type of RuleGroupTypeIC
.convertQuery
method to toggle a query between the conventional structure with combinators at the group level (RuleGroupType
) and the "independent combinator" structure (RuleGroupTypeIC
, used with the independentCombinators
prop). For unidirectional conversions, convertToIC
and convertFromIC
are also available.parseSQL
method (RuleGroupType
or RuleGroupTypeIC
) is now inferred from the parameters.Changelog
[v4.1.1] - 2022-01-10
RuleGroupType
and RuleGroupTypeIC
to pass down the R
(rule) and C
(combinator) generics to the rules
array.Changelog
[v4.1.0] - 2022-01-09
react-querybuilder
v4.0.0.ValueSelector
-based components, including field selectors, operator selectors, combinator selectors, and value editors where the type
is "select" now support option groups. Pass { label: string; options: NameLabelPair[] }[]
instead of NameLabelPair[]
.