diff --git a/caravel/assets/visualizations/filter_box.jsx b/caravel/assets/visualizations/filter_box.jsx index f50e52eba926e..ca56ebb523eab 100644 --- a/caravel/assets/visualizations/filter_box.jsx +++ b/caravel/assets/visualizations/filter_box.jsx @@ -86,9 +86,15 @@ function filterBox(slice) { // filter box should ignore the dashboard's filters const url = slice.jsonEndpoint({ extraFilters: false }); $.getJSON(url, (payload) => { + const filtersChoices = {}; + // Making sure the ordering of the fields matches the setting in the + // dropdown as it may have been shuffled while serialized to json + payload.form_data.groupby.forEach((f) => { + filtersChoices[f] = payload.data[f]; + }); ReactDOM.render( ,