|
|
@ -3,16 +3,21 @@ import { connect } from 'react-redux';
|
|
|
|
import { createSelector } from 'reselect';
|
|
|
|
import { createSelector } from 'reselect';
|
|
|
|
import sortByName from 'Utilities/Array/sortByName';
|
|
|
|
import sortByName from 'Utilities/Array/sortByName';
|
|
|
|
import { filterBuilderTypes } from 'Helpers/Props';
|
|
|
|
import { filterBuilderTypes } from 'Helpers/Props';
|
|
|
|
|
|
|
|
import * as filterTypes from 'Helpers/Props/filterTypes';
|
|
|
|
import FilterBuilderRowValue from './FilterBuilderRowValue';
|
|
|
|
import FilterBuilderRowValue from './FilterBuilderRowValue';
|
|
|
|
|
|
|
|
|
|
|
|
function createTagListSelector() {
|
|
|
|
function createTagListSelector() {
|
|
|
|
return createSelector(
|
|
|
|
return createSelector(
|
|
|
|
|
|
|
|
(state, { filterType }) => filterType,
|
|
|
|
(state, { sectionItems }) => sectionItems,
|
|
|
|
(state, { sectionItems }) => sectionItems,
|
|
|
|
(state, { selectedFilterBuilderProp }) => selectedFilterBuilderProp,
|
|
|
|
(state, { selectedFilterBuilderProp }) => selectedFilterBuilderProp,
|
|
|
|
(sectionItems, selectedFilterBuilderProp) => {
|
|
|
|
(filterType, sectionItems, selectedFilterBuilderProp) => {
|
|
|
|
if (
|
|
|
|
if (
|
|
|
|
selectedFilterBuilderProp.type === filterBuilderTypes.NUMBER ||
|
|
|
|
(selectedFilterBuilderProp.type === filterBuilderTypes.NUMBER ||
|
|
|
|
selectedFilterBuilderProp.type === filterBuilderTypes.STRING
|
|
|
|
selectedFilterBuilderProp.type === filterBuilderTypes.STRING) &&
|
|
|
|
|
|
|
|
filterType !== filterTypes.EQUAL &&
|
|
|
|
|
|
|
|
filterType !== filterBuilderTypes.NOT_EQUAL ||
|
|
|
|
|
|
|
|
!selectedFilterBuilderProp.optionsSelector
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
return [];
|
|
|
|
return [];
|
|
|
|
}
|
|
|
|
}
|
|
|
|