Skip to content

Commit 7036078

Browse files
committed
Adjust API demo links
1 parent 66ac87d commit 7036078

File tree

1 file changed

+11
-33
lines changed

1 file changed

+11
-33
lines changed

docs/api/querybuilder.mdx

Lines changed: 11 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -576,41 +576,31 @@ The `translations` prop is optional, and each top-level property in the `transla
576576

577577
### `showCombinatorsBetweenRules`
578578

579-
`boolean` (default `false`)
580-
581-
[Demo with this feature enabled](https://react-querybuilder.github.io/react-querybuilder/#showCombinatorsBetweenRules=true)
579+
`boolean` (default `false`) [_Click for demo_](https://react-querybuilder.github.io/react-querybuilder/#showCombinatorsBetweenRules=true)
582580

583581
Pass `true` to show the combinators (and/or) between rules and rule groups instead of at the top of rule groups. This can make some queries easier to understand as it encourages a more natural style of reading.
584582

585583
### `showNotToggle`
586584

587-
`boolean` (default `false`)
588-
589-
[Demo with this feature enabled](https://react-querybuilder.github.io/react-querybuilder/#showNotToggle=true)
585+
`boolean` (default `false`) [_Click for demo_](https://react-querybuilder.github.io/react-querybuilder/#showNotToggle=true)
590586

591587
Pass `true` to show the "Not" (aka inversion) toggle switch for each rule group.
592588

593589
### `showCloneButtons`
594590

595-
`boolean` (default `false`)
596-
597-
[Demo with this feature enabled](https://react-querybuilder.github.io/react-querybuilder/#showCloneButtons=true)
591+
`boolean` (default `false`) [_Click for demo_](https://react-querybuilder.github.io/react-querybuilder/#showCloneButtons=true)
598592

599593
Pass `true` to show the "Clone rule" and "Clone group" buttons.
600594

601595
### `resetOnFieldChange`
602596

603-
`boolean` (default `true`)
604-
605-
[Demo with this feature disabled](https://react-querybuilder.github.io/react-querybuilder/#resetOnFieldChange=false)
597+
`boolean` (default `true`) [_Click for demo with this feature disabled_](https://react-querybuilder.github.io/react-querybuilder/#resetOnFieldChange=false)
606598

607599
Pass `false` to avoid resetting the operator and value when the field changes.
608600

609601
### `resetOnOperatorChange`
610602

611-
`boolean` (default `false`)
612-
613-
[Demo with this feature enabled](https://react-querybuilder.github.io/react-querybuilder/#resetOnOperatorChange=true)
603+
`boolean` (default `false`) [_Click for demo_](https://react-querybuilder.github.io/react-querybuilder/#resetOnOperatorChange=true)
614604

615605
Pass `true` to reset the value when the operator changes.
616606

@@ -622,48 +612,36 @@ Pass `false` to disable the `onQueryChange` call on mount of the component which
622612

623613
### `autoSelectField`
624614

625-
`boolean` (default `true`)
626-
627-
[Demo with this feature disabled](https://react-querybuilder.github.io/react-querybuilder/#autoSelectField=false)
615+
`boolean` (default `true`) [_Click for demo with this feature disabled_](https://react-querybuilder.github.io/react-querybuilder/#autoSelectField=false)
628616

629617
Pass `false` to add an empty option (`"------"`) to the `fields` array as the first element (which will be selected by default for new rules). When the empty field option is selected, the operator and value components will not display for that rule.
630618

631619
### `addRuleToNewGroups`
632620

633-
`boolean` (default `false`)
634-
635-
[Demo with this feature enabled](https://react-querybuilder.github.io/react-querybuilder/#addRuleToNewGroups=true)
621+
`boolean` (default `false`) [_Click for demo_](https://react-querybuilder.github.io/react-querybuilder/#addRuleToNewGroups=true)
636622

637623
Pass `true` to automatically add a rule to new groups. If a `query` prop is not passed in, a rule will be added to the root group when the component is mounted. If a `query` prop is passed in with an empty `rules` array, no rule will be added automatically.
638624

639625
### `independentCombinators`
640626

641-
`boolean` (default `false`)
642-
643-
[Demo with this feature enabled](https://react-querybuilder.github.io/react-querybuilder/#independentCombinators=true)
627+
`boolean` (default `false`) [_Click for demo_](https://react-querybuilder.github.io/react-querybuilder/#independentCombinators=true)
644628

645629
Pass `true` to insert an independent combinator selector between each rule/group in a rule group. The combinator selector at the group level will not be available. Visually, this is similar to the [`showCombinatorsBetweenRules`](#showcombinatorsbetweenrules) option, except that each combinator selector is independently controlled. You may find that users take to this configuration more easily, as it can allow them to express queries more like they would in natural language.
646630

647631
### `enableDragAndDrop`
648632

649-
`boolean` (default `false`)
650-
651-
[Demo with this feature enabled](https://react-querybuilder.github.io/react-querybuilder/#enableDragAndDrop=true)
633+
`boolean` (default `false`) [_Click for demo_](https://react-querybuilder.github.io/react-querybuilder/#enableDragAndDrop=true)
652634

653635
Pass `true` to display a drag handle to the left of each group header and rule. Clicking and dragging the handle element allows visual reordering of rules and groups.
654636

655637
### `disabled`
656638

657-
`boolean | number[][]` (default `false`)
658-
659-
[Demo with this feature enabled](https://react-querybuilder.github.io/react-querybuilder/#disabled=true)
639+
`boolean | number[][]` (default `false`) [_Click for demo_](https://react-querybuilder.github.io/react-querybuilder/#disabled=true)
660640

661641
Pass `true` to disable all subcomponents and prevent changes to the query. Pass an array of paths to disable specific rules and/or groups, e.g. `disabled={[[0]]}` will disable the first rule and its subcomponents but nothing else.
662642

663643
### `validator`
664644

665-
`QueryValidator`
666-
667-
[Demo with this feature enabled](https://react-querybuilder.github.io/react-querybuilder/#validateQuery=true)
645+
`QueryValidator` [_Click for demo_](https://react-querybuilder.github.io/react-querybuilder/#validateQuery=true)
668646

669647
This is a callback function that is executed each time `QueryBuilder` renders. The return value should be a boolean (`true` for valid queries, `false` for invalid) or an object whose keys are the `id`s of each rule and group in the query tree. If such an object is returned, the values associated to each key should be a boolean (`true` for valid rules/groups, `false` for invalid) or an object with a `valid` boolean property and an optional `reasons` array. The full object will be passed to each rule and group component, and all sub-components of each rule/group will receive the value associated with the rule's or group's `id`. See the [Validation](./validation) documentation for more information.

0 commit comments

Comments
 (0)