How to use the @appbaseio/reactivemaps.AppbaseSensorHelper.selectedSensor function in @appbaseio/reactivemaps

To help you get started, we’ve selected a few @appbaseio/reactivemaps 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 appbaseio / reactivesearch / app / sensors / TagCloud.js View on Github external
return currentQuery;
		};
		const obj = {
			key: props.componentId,
			value: {
				queryType: this.type,
				inputData: props.dataField,
				customQuery: getQuery,
				reactiveId: this.context.reactiveId,
				showFilter: props.showFilter,
				filterLabel: props.filterLabel ? props.filterLabel : props.componentId,
				component: "TagCloud",
				defaultSelected: this.urlParams !== null ? this.urlParams : props.defaultSelected
			}
		};
		helper.selectedSensor.setSensorInfo(obj);
	}
github appbaseio / reactivesearch / app / sensors / CategorySearch.js View on Github external
defaultSelected: this.urlParams !== null ? this.urlParams : props.defaultSelected
			}
		};
		if (props.highlight) {
			obj.value.externalQuery = this.highlightQuery(props);
		}
		helper.selectedSensor.setSensorInfo(obj);
		const searchObj = {
			key: this.searchInputId,
			value: {
				queryType: "multi_match",
				inputData: props.dataField,
				customQuery: this.defaultSearchQuery
			}
		};
		helper.selectedSensor.setSensorInfo(searchObj);
	}
github appbaseio / reactivesearch / app / sensors / MultiLevelMenu.js View on Github external
const obj = {
				key,
				value: {
					queryType: "term",
					inputData: this.props.dataField[level],
					customQuery() {
						return null;
					}
				}
			};
			helper.selectedSensor.setSensorInfo(obj);
			const obj1 = {
				key,
				value: ""
			};
			helper.selectedSensor.set(obj1);
		}
		setInternalQuery.call(this, "subCategory", 0);
github appbaseio / reactivesearch / app / sensors / NestedMultiList.js View on Github external
this.nested.forEach((name) => {
			const obj = {
				key: name,
				value: this.sortObj
			};
			helper.selectedSensor.setSortInfo(obj);
		});
	}
github appbaseio / reactivesearch / app / sensors / DynamicRangeSlider.js View on Github external
if (this.props.onQueryChange && JSON.stringify(this.previousQuery) !== JSON.stringify(currentQuery)) {
				this.props.onQueryChange(this.previousQuery, currentQuery);
			}
			this.previousQuery = currentQuery;
			return currentQuery;
		};
		const obj1 = {
			key: `${this.props.componentId}-internal`,
			value: {
				queryType: "range",
				inputData: this.props.dataField,
				customQuery: getQuery
			}
		};
		helper.selectedSensor.setSensorInfo(obj);
		helper.selectedSensor.setSensorInfo(obj1);
		this.setRangeValue();
	}
github appbaseio / reactivesearch / app / sensors / DynamicRangeSlider.js View on Github external
setRangeValue(value = "range") {
		const objValue = {
			key: `${this.props.componentId}-internal`,
			value
		};
		helper.selectedSensor.set(objValue, true);
		this.updateValues(this.props.defaultSelected);
	}
github appbaseio / reactivesearch / app / sensors / NestedList.js View on Github external
showFilter: this.props.showFilter,
				filterLabel: this.props.filterLabel ? this.props.filterLabel : this.props.componentId,
				component: "NestedList",
				defaultSelected: this.urlParams !== null ? this.urlParams : this.props.defaultSelected
			}
		};
		helper.selectedSensor.setSensorInfo(obj);
		const nestedObj = {
			key: `nestedSelectedValues-${this.props.componentId}`,
			value: {
				queryType: this.type,
				inputData: this.props.dataField[0],
				customQuery: () => { }
			}
		};
		helper.selectedSensor.setSensorInfo(nestedObj);
	}
github appbaseio / reactivesearch / app / sensors / NestedList.js View on Github external
setValue(value, isExecuteQuery = false, changeNestedValue = true) {
		value = value && value.length ? value : null;
		const obj = {
			key: this.props.componentId,
			value
		};
		const nestedObj = {
			key: `nestedSelectedValues-${this.props.componentId}`,
			value
		};
		helper.selectedSensor.set(nestedObj, changeNestedValue);

		const execQuery = () => {
			if (this.props.onValueChange) {
				this.props.onValueChange(obj.value);
			}
			const paramValue = value && value.length ? value.join("/") : null;
			if (this.props.URLParams) {
				helper.URLParams.update(this.props.componentId, paramValue, this.props.URLParams);
			}
			helper.selectedSensor.set(obj, isExecuteQuery);
		};

		if (this.props.beforeValueChange) {
			this.props.beforeValueChange(obj.value)
			.then(() => {
				execQuery();
github appbaseio / reactivesearch / app / sensors / CategorySearch.js View on Github external
key: props.componentId,
			value: {
				queryType: this.type,
				inputData: props.dataField,
				customQuery: getQuery,
				reactiveId: this.context.reactiveId,
				showFilter: props.showFilter,
				filterLabel: props.filterLabel ? props.filterLabel : props.componentId,
				component: "CategorySearch",
				defaultSelected: this.urlParams !== null ? this.urlParams : props.defaultSelected
			}
		};
		if (props.highlight) {
			obj.value.externalQuery = this.highlightQuery(props);
		}
		helper.selectedSensor.setSensorInfo(obj);
		const searchObj = {
			key: this.searchInputId,
			value: {
				queryType: "multi_match",
				inputData: props.dataField,
				customQuery: this.defaultSearchQuery
			}
		};
		helper.selectedSensor.setSensorInfo(searchObj);
	}
github appbaseio / reactivesearch / app / actuators / ResultCard.js View on Github external
setTimeout(() => {
				const obj = {
					key: "streamChanges",
					value: ""
				};
				helper.selectedSensor.set(obj, true);
			}, 100);
		}