You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|preferWidgets | | |See usecase at {config3}[`examples/demo`] for `slider` field. +
238
+
|preferWidgets | | |See usecase at {config3}[`packages/examples/src/demo/config`] for `slider` field. +
239
239
Its type is `number`. There are 3 widgets defined for number type: `number`, `slider`, `rangeslider`. +
240
240
So setting `preferWidgets: ['slider', 'rangeslider']` will force rendering slider, and setting `preferWidgets: ['number']` will render number input.
241
241
|operators, defaultOperator, widgets, valueSources | | |You can override config of corresponding type (see below at section link:#configtypes[config.types])
@@ -576,7 +576,7 @@ There is also special `proximity` operator, its options are rendered with `<Prox
576
576
import {CustomOperators: {ProximityOperator}} from '@react-awesome-query-builder/ui';
577
577
----
578
578
579
-
See {config3}[`examples/demo`]
579
+
See {config3}[`packages/examples/src/demo/config`]
580
580
====
581
581
582
582
@@ -720,7 +720,7 @@ To enable this feature set `valueSources` of type to `['value', 'func']` (see be
720
720
|valueSources | |keys of `valueSourcesInfo` at link:#configsettings[config.settings] |Array with values `'value'`, `'field'`, `'func'`. If `'value'` is included, you can compare field with values. If `'field'` is included, you can compare field with another field of same type. If `'func'` is included, you can compare field with result of function (see link:#configfuncs[config.funcs]).
721
721
|defaultOperator | | |If specified, it will be auto selected when user selects field
722
722
|widgets.* |+ | |Available widgets for current type and their config. +
723
-
Normally there is only 1 widget per type. But see type `number` at {config3}[`examples/demo`] - it has 3 widgets `number`, `slider`, `rangeslider`. +
723
+
Normally there is only 1 widget per type. But see type `number` at {config3}[`packages/examples/src/demo/config`] - it has 3 widgets `number`, `slider`, `rangeslider`. +
724
724
Or see type `select` - it has widget `select` for operator `=` and widget `multiselect` for operator `IN`.
725
725
|widgets.<widget>.operators | | |List of operators for widget, described in link:#configoperators[config.operators]
726
726
|widgets.<widget>.widgetProps | | |Can be used to override config of corresponding widget specified in link:#configwidgets[config.widgets]. Example: `{timeFormat: 'h:mm:ss A'}` for time field with AM/PM.
Copy file name to clipboardexpand all lines: CONTRIBUTING.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -55,8 +55,8 @@ Or with VSCode:
55
55
-[`packages/bootstrap`](/packages/bootstrap) - Provides config with [Bootstrap](https://reactstrap.github.io/) widgets
56
56
-[`packages/fluent`](/packages/fluent) - Provides config with [Fluent UI](https://developer.microsoft.com/en-us/fluentui#/get-started/web) widgets
57
57
-[`packages/examples`](/packages/examples) - Demo app with hot reload of demo code and local library code, uses TS, uses complex config to demonstrate anvanced usage.
-[`src/demo_switch`](/packages/examples/src/demo_switch) - Demo of ternary mode (switch/case)
60
60
-[`packages/sandbox`](/packages/sandbox) - Demo app with hot reload of only demo code (uses latest version of library from npm), uses TS, uses AntDesign widgets.
61
61
-[`packages/sandbox_simple`](/packages/sandbox_simple) - Demo app with hot reload of only demo code (uses latest version of library from npm), not uses TS, uses vanilla widgets.
62
62
-[`packages/sandbox_next`](/packages/sandbox_next) - Demo app on Next.js with SSR, simple server-side query storage and export
@@ -93,7 +93,7 @@ Currently there are 5 collections of widgets:
93
93
Let's say you want to create new collection of widgets for new UI framework X to be used in this lib (and submit PR which is always welcomed!).
94
94
You can use any of this packages as a skeleton, eg. [mui](/packages/mui). I don't recommend to take [antd](/packages/antd) as example as it's more complicated.
95
95
Create new package `@react-awesome-query-builder/x` in [packages](/packages).
96
-
For a playground integrate it in [examples](/packages/examples) - add to `dependecies` in [package.json](/packages/examples/package.json), `paths` in [tsconfig.json](/packages/examples/tsconfig.json), `aliases` in [webpack.config.js](/packages/examples/webpack.config.js), `skinToConfig` in [config.tsx](/packages/examples/demo/config.tsx).
96
+
For a playground integrate it in [examples](/packages/examples) - add to `dependecies` in [package.json](/packages/examples/package.json), `paths` in [tsconfig.json](/packages/examples/tsconfig.json), `aliases` in [webpack.config.js](/packages/examples/webpack.config.js), `skinToConfig` in [config.tsx](/packages/examples/src/demo/config/index.tsx).
97
97
98
98
Take [PR #727 to add Fluent UI widgets](https://github.com/ukrbublik/react-awesome-query-builder/pull/727) as an example.
Copy file name to clipboardexpand all lines: README.md
+6-5
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,7 @@ Now [Fluent UI](https://developer.microsoft.com/en-us/fluentui#/get-started/web)
28
28
See [live demo](https://ukrbublik.github.io/react-awesome-query-builder)
29
29
30
30
[](https://codesandbox.io/p/github/ukrbublik/react-awesome-query-builder/master?file=%2Fpackages%2Fexamples%2Fdemo%2Findex.tsx)
31
+
[](https://codespaces.new/ukrbublik/react-awesome-query-builder)
31
32
32
33
33
34
*[Features](#features)
@@ -238,7 +239,7 @@ class DemoQueryBuilder extends Component {
238
239
)
239
240
240
241
onChange= (immutableTree, config) => {
241
-
// Tip: for better performance you can apply `throttle` - see `examples/demo`
242
+
// Tip: for better performance you can apply `throttle` - see `packages/examples/src/demo`
- If you put query builder component inside [Fluent-UI](https://developer.microsoft.com/en-us/fluentui)'s `<Panel />`, please:
396
397
- set css `.ms-Layer.ms-Layer--fixed.root-119 { z-index: 900 !important; }`
397
398
-`props` arg in `renderBuilder` have `actions` and `dispatch` you can use to run actions programmatically
398
-
- For a list of available actions see `Actions` interface in [`index.d.ts`](/packages/core/modules/index.d.ts). See `runActions()` in [examples](/packages/examples/demo/index.tsx) as a demonstration of calling actions programmatically.
399
+
- For a list of available actions see `Actions` interface in [`index.d.ts`](/packages/core/modules/index.d.ts). See `runActions()` in [examples](/packages/examples/src/demo/index.tsx) as a demonstration of calling actions programmatically.
399
400
400
401
## `<Builder />`
401
402
@@ -617,7 +618,7 @@ const config = {
617
618
// then use <Query {...config} />
618
619
```
619
620
620
-
See [example](/packages/examples/demo/index.tsx).
621
+
See [example](/packages/examples/src/demo/index.tsx).
0 commit comments