You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by yo...@apache.org on 2021/05/28 03:30:08 UTC

[superset] branch master updated: fix: timerange in filter box error (#14890)

This is an automated email from the ASF dual-hosted git repository.

yongjiezhao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new acbbced  fix: timerange in filter box error (#14890)
acbbced is described below

commit acbbced20b3bb2faf72294d91455a878396e4c85
Author: Yongjie Zhao <yo...@gmail.com>
AuthorDate: Fri May 28 04:28:58 2021 +0100

    fix: timerange in filter box error (#14890)
---
 superset-frontend/src/visualizations/FilterBox/FilterBox.jsx | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/superset-frontend/src/visualizations/FilterBox/FilterBox.jsx b/superset-frontend/src/visualizations/FilterBox/FilterBox.jsx
index 59c9062..d90781b 100644
--- a/superset-frontend/src/visualizations/FilterBox/FilterBox.jsx
+++ b/superset-frontend/src/visualizations/FilterBox/FilterBox.jsx
@@ -158,6 +158,8 @@ class FilterBox extends React.PureComponent {
     if (options !== null) {
       if (Array.isArray(options)) {
         vals = options.map(opt => (typeof opt === 'string' ? opt : opt.value));
+      } else if (Object.values(TIME_FILTER_MAP).includes(fltr)) {
+        vals = options.value ?? options;
       } else {
         // must use array member for legacy extra_filters's value
         vals = ensureIsArray(options.value ?? options);