How to use the react-awesome-query-builder.BasicConfig.operators function in react-awesome-query-builder

To help you get started, we’ve selected a few react-awesome-query-builder examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ukrbublik / react-awesome-query-builder / examples / demo / config.tsx View on Github external
options: {
        ...BasicConfig.operators.proximity.options,
        optionLabel: "Near", // label on top of "near" selectbox (for config.settings.showLabels==true)
        optionTextBefore: "Near", // label before "near" selectbox (for config.settings.showLabels==false)
        optionPlaceholder: "Select words between", // placeholder for "near" selectbox
        minProximity: 2,
        maxProximity: 10,
        defaults: {
            proximity: 2
        },
        customProps: {}
    }
};

const operators: Operators = {
    ...BasicConfig.operators,
    // examples of  overriding
    between: {
        ...BasicConfig.operators.between,
        valueLabels: [
            'Value from',
            'Value to'
        ],
        textSeparators: [
            'from',
            'to'
        ],
    },
    proximity,
};
github ukrbublik / react-awesome-query-builder / examples / demo / config.tsx View on Github external
} from 'react-awesome-query-builder';
import en_US from 'antd/lib/locale-provider/en_US';
import ru_RU from 'antd/lib/locale-provider/ru_RU';
const {
    FieldSelect,
    FieldDropdown,
    FieldCascader,
    VanillaFieldSelect,
  } = Widgets;

const conjunctions: Conjunctions = {
    ...BasicConfig.conjunctions,
};

const proximity: OperatorProximity = {
    ...BasicConfig.operators.proximity,
    valueLabels: [
        { label: 'Word 1', placeholder: 'Enter first word' },
        { label: 'Word 2', placeholder: 'Enter second word' },
    ],
    textSeparators: [
        //'Word 1',
        //'Word 2'
    ],
    options: {
        ...BasicConfig.operators.proximity.options,
        optionLabel: "Near", // label on top of "near" selectbox (for config.settings.showLabels==true)
        optionTextBefore: "Near", // label before "near" selectbox (for config.settings.showLabels==false)
        optionPlaceholder: "Select words between", // placeholder for "near" selectbox
        minProximity: 2,
        maxProximity: 10,
        defaults: {
github ukrbublik / react-awesome-query-builder / sandbox / src / demo / config.js View on Github external
import { Widgets, Operators, BasicConfig } from 'react-awesome-query-builder';
import en_US from 'antd/lib/locale-provider/en_US';
import ru_RU from 'antd/lib/locale-provider/ru_RU';
const {
    FieldSelect,
    FieldDropdown,
    FieldCascader,
    VanillaFieldSelect
  } = Widgets;

const conjunctions = {
    ...BasicConfig.conjunctions
};

const operators = {
    ...BasicConfig.operators,
    // examples of  overriding
    between: {
        ...BasicConfig.operators.between,
        valueLabels: [
            'Value from',
            'Value to'
        ],
        textSeparators: [
            'from',
            'to'
        ],
    },
    proximity: {
        ...BasicConfig.operators.proximity,
        valueLabels: [
            { label: 'Word 1', placeholder: 'Enter first word' },
github ukrbublik / react-awesome-query-builder / sandbox / src / demo / config.js View on Github external
const {
    FieldSelect,
    FieldDropdown,
    FieldCascader,
    VanillaFieldSelect
  } = Widgets;

const conjunctions = {
    ...BasicConfig.conjunctions
};

const operators = {
    ...BasicConfig.operators,
    // examples of  overriding
    between: {
        ...BasicConfig.operators.between,
        valueLabels: [
            'Value from',
            'Value to'
        ],
        textSeparators: [
            'from',
            'to'
        ],
    },
    proximity: {
        ...BasicConfig.operators.proximity,
        valueLabels: [
            { label: 'Word 1', placeholder: 'Enter first word' },
            { label: 'Word 2', placeholder: 'Enter second word' },
        ],
        textSeparators: [

react-awesome-query-builder

User-friendly query builder for React. Please migrate to new @react-awesome-query-builder/* See https://github.com/ukrbublik/react-awesome-query-builder#migration-to-600

MIT
Latest version published 2 years ago

Package Health Score

62 / 100
Full package analysis