diff --git a/frontend/app/components/shared/DateRangeDropdown/DateRangeDropdown.js b/frontend/app/components/shared/DateRangeDropdown/DateRangeDropdown.js
index f29d47745..05a42658f 100644
--- a/frontend/app/components/shared/DateRangeDropdown/DateRangeDropdown.js
+++ b/frontend/app/components/shared/DateRangeDropdown/DateRangeDropdown.js
@@ -88,7 +88,7 @@ export default class DateRangeDropdown extends React.PureComponent {
: null
}
- selection={!button}
+ // selection={!button}
name="sessionDateRange"
direction={ direction }
className={ button ? "" : "customDropdown" }
@@ -97,8 +97,9 @@ export default class DateRangeDropdown extends React.PureComponent {
icon={ null }
>
- { options.map(props =>
+ { options.map((props, i) =>
{filters.map((filter, filterIndex) => filter.isEvent ? (
props.onUpdateFilter(filterIndex, filter)}
@@ -72,6 +73,7 @@ function FilterList(props: Props) {
FILTERS
{filters.map((filter, filterIndex) => !filter.isEvent ? (
{
const newValues = filter.value.concat("")
- props.onUpdate({ ...filter, value: newValues })
+ try {
+ props.onUpdate({ ...filter.toData(), value: newValues })
+ } catch (e) {
+ props.onUpdate({ ...filter, value: newValues })
+ }
}
const onRemoveValue = (valueIndex) => {
@@ -69,6 +73,7 @@ function FilterValue(props: Props) {
case FilterType.MULTIPLE_DROPDOWN:
return (
(...args) => (dispatch, getStat
dispatch(actionCreator(...args));
const filter = getState().getIn([ 'search', 'instance']).toData();
filter.filters = filter.filters.map(filterMap);
- filter.isNew = true // TODO remove this line
return isRoute(ERRORS_ROUTE, window.location.pathname)
? dispatch(fetchErrorsList(filter))
@@ -124,7 +123,8 @@ export const applyFilter = reduceThenFetchResource((filter, fromUrl=false) => ({
}));
export const applySavedSearch = (filter) => (dispatch, getState) => {
- dispatch(edit(filter ? filter.filter : new Filter({ filters: []})));
+ console.log('applySavedSearch', filter);
+ dispatch(edit({ filters: filter ? filter.filter.filters : [] }));
return dispatch({
type: APPLY_SAVED_SEARCH,
filter,
diff --git a/frontend/app/types/filter/newFilter.js b/frontend/app/types/filter/newFilter.js
index 81d14e516..e5193a393 100644
--- a/frontend/app/types/filter/newFilter.js
+++ b/frontend/app/types/filter/newFilter.js
@@ -40,7 +40,7 @@ export const filtersMap = {
[FilterKey.REVID]: { key: FilterKey.REVID, type: FilterType.MULTIPLE, category: FilterCategory.GEAR, label: 'RevId', operator: 'is', operatorOptions: filterOptions.stringOperators, icon: 'filters/rev-id' },
[FilterKey.REFERRER]: { key: FilterKey.REFERRER, type: FilterType.MULTIPLE, category: FilterCategory.RECORDING_ATTRIBUTES, label: 'Referrer', operator: 'is', operatorOptions: filterOptions.stringOperators, icon: 'filters/referrer' },
[FilterKey.DURATION]: { key: FilterKey.DURATION, type: FilterType.DURATION, category: FilterCategory.RECORDING_ATTRIBUTES, label: 'Duration', operator: 'is', operatorOptions: filterOptions.stringOperators, icon: 'filters/duration' },
- [FilterKey.USER_COUNTRY]: { key: FilterKey.USER_COUNTRY, type: FilterType.DROPDOWN, category: FilterCategory.RECORDING_ATTRIBUTES, label: 'User Country', operator: 'is', operatorOptions: filterOptions.stringOperators, icon: 'filters/country', options: countryOptions },
+ [FilterKey.USER_COUNTRY]: { key: FilterKey.USER_COUNTRY, type: FilterType.MULTIPLE_DROPDOWN, category: FilterCategory.RECORDING_ATTRIBUTES, label: 'User Country', operator: 'is', operatorOptions: filterOptions.stringOperators, icon: 'filters/country', options: countryOptions },
[FilterKey.CONSOLE]: { key: FilterKey.CONSOLE, type: FilterType.MULTIPLE, category: FilterCategory.JAVASCRIPT, label: 'Console', operator: 'is', operatorOptions: filterOptions.stringOperators, icon: 'filters/console' },
[FilterKey.USERID]: { key: FilterKey.USERID, type: FilterType.MULTIPLE, category: FilterCategory.USER, label: 'User Id', operator: 'is', operatorOptions: filterOptions.stringOperators, icon: 'filters/userid' },
[FilterKey.USERANONYMOUSID]: { key: FilterKey.USERANONYMOUSID, type: FilterType.MULTIPLE, category: FilterCategory.USER, label: 'User AnonymousId', operator: 'is', operatorOptions: filterOptions.stringOperators, icon: 'filters/userid' },