Skip to content

Commit

Permalink
[hotfix] 'filter box from and to date filter #2649' (#2785)
Browse files Browse the repository at this point in the history
  • Loading branch information
yamdraco authored and mistercrunch committed May 23, 2017
1 parent b0e2904 commit bfa40bd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion superset/assets/javascripts/dashboard/Dashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,13 @@ export function dashboardContainer(dashboard, datasources, userid) {
}
if (!(col in this.filters[sliceId]) || !merge) {
this.filters[sliceId][col] = vals;
} else {

// d3.merge pass in array of arrays while some value form filter components
// from and to filter box require string to be process and return
} else if (this.filters[sliceId][col] instanceof Array) {
this.filters[sliceId][col] = d3.merge([this.filters[sliceId][col], vals]);
} else {
this.filters[sliceId][col] = d3.merge([[this.filters[sliceId][col]], vals])[0] || '';
}
if (refresh) {
this.refreshExcept(sliceId);
Expand Down

0 comments on commit bfa40bd

Please sign in to comment.