Skip to content

Commit

Permalink
[FilterBox] use column verbose names (#2970)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch authored Jun 17, 2017
1 parent 1ce3b81 commit c083aec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion superset/assets/visualizations/filter_box.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const propTypes = {
filtersChoices: PropTypes.object,
onChange: PropTypes.func,
showDateFilter: PropTypes.bool,
datasource: PropTypes.object.isRequired,
};

const defaultProps = {
Expand Down Expand Up @@ -81,7 +82,7 @@ class FilterBox extends React.Component {
});
return (
<div key={filter} className="m-b-5">
{filter}
{this.props.datasource.verbose_map[filter] || filter}
<Select.Creatable
placeholder={`Select [${filter}]`}
key={filter}
Expand Down Expand Up @@ -143,6 +144,7 @@ function filterBox(slice, payload) {
filtersChoices={filtersChoices}
onChange={slice.addFilter}
showDateFilter={fd.date_filter}
datasource={slice.datasource}
origSelectedValues={slice.getFilters() || {}}
instantFiltering={fd.instant_filtering}
/>,
Expand Down

0 comments on commit c083aec

Please sign in to comment.