Skip to content

Commit

Permalink
v0.17.0 (#2298)
Browse files Browse the repository at this point in the history
  • Loading branch information
vera-liu authored Feb 28, 2017
1 parent dd9f431 commit fc64a75
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,12 @@ export default class Filter extends React.Component {
this.fetchFilterValues(filter.col);
}
}
// switching filter value between array/string when needed
if (strFilterOps.indexOf(filter.op) !== -1) {
// druid having filter or regex/==/!= filters
if (typeof filter.val !== 'string') {
this.props.changeFilter('val', filter.val.length > 0 ? filter.val[0] : '');
}
return (
<input
type="text"
Expand All @@ -109,6 +113,9 @@ export default class Filter extends React.Component {
/>
);
}
if (typeof filter.val === 'string') {
this.props.changeFilter('val', filter.val === '' ? [] : [filter.val]);
}
return (
<SelectControl
multi
Expand Down

0 comments on commit fc64a75

Please sign in to comment.