@react-awesome-query-builder/core
Version:
User-friendly query builder for React. Core
41 lines (38 loc) • 881 B
JavaScript
import * as constants from "../stores/constants";
import { toImmutableList } from "../utils/stuff";
/**
* @param {object} config
* @param {Immutable.List} path
* @param {string} conjunction
*/
export var setConjunction = function setConjunction(config, path, conjunction) {
return {
type: constants.SET_CONJUNCTION,
path: toImmutableList(path),
conjunction: conjunction
};
};
/**
* @param {object} config
* @param {Immutable.List} path
* @param {bool} not
*/
export var setNot = function setNot(config, path, not) {
return {
type: constants.SET_NOT,
path: toImmutableList(path),
not: not
};
};
/**
* @param {object} config
* @param {Immutable.List} path
* @param {bool} lock
*/
export var setLock = function setLock(config, path, lock) {
return {
type: constants.SET_LOCK,
path: toImmutableList(path),
lock: lock
};
};