Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
setReact(props) {
// Set the react - add self aggs query as well with react
const react = Object.assign({}, props.react);
if (this.histogram !== null) {
react.aggs = {
key: props.dataField,
sort: "asc",
size: 1000,
customQuery: this.histogramQuery
};
}
const reactAnd = [`${props.componentId}-internal`];
this.react = helper.setupReact(react, reactAnd);
}
setReact(props) {
const react = Object.assign({}, props.react);
const reactAnd = ["streamChanges"];
if (props.pagination) {
reactAnd.push("paginationChanges");
react.pagination = null;
}
if (this.sortObj) {
this.enableSort(reactAnd);
}
this.react = helper.setupReact(react, reactAnd);
}
setReact(props) {
const react = Object.assign({}, props.react);
const reactAnd = ["streamChanges"];
if (props.pagination) {
reactAnd.push("paginationChanges");
react.pagination = null;
}
if (this.sortObj) {
this.enableSort(reactAnd);
}
this.react = helper.setupReact(react, reactAnd);
}
setReact(props) {
const react = Object.assign({}, props.react);
react.aggs = {
key: props.dataField[0],
sort: props.sortBy,
size: props.size,
customQuery: this.nestedAggQuery
};
const reactAnd = [this.nested[0], `nestedSelectedValues-${props.componentId}`];
this.react = helper.setupReact(react, reactAnd);
}
setReact(props) {
const react = Object.assign({}, props.react);
react.aggs = {
key: props.dataField,
sort: "asc",
size: props.size,
sortRef: `${props.componentId}-sort`
};
const reactAnd = [`${props.componentId}-sort`, "tagCloudChanges"];
this.react = helper.setupReact(react, reactAnd);
}
setReact(props) {
const react = Object.assign({}, props.react);
react.aggs = {
key: props.categoryField
};
const reactAnd = [this.searchInputId];
this.react = helper.setupReact(react, reactAnd);
}