[hotfix] 'filter box from and to date filter #2649' (#2785)

This commit is contained in:
yamdraco 2017-05-23 12:15:10 +08:00 committed by Maxime Beauchemin
parent b0e2904c24
commit bfa40bd360
1 changed files with 6 additions and 1 deletions

View File

@ -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);