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

graceguo pushed a commit to branch gg-Test-Scoped-Filters
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git

commit 3c2fc9152f6b2db5ecf7e1d0ee56608a6619777f
Author: Grace <[email protected]>
AuthorDate: Mon Nov 11 14:36:51 2019 -0800

    minor bug fixes
---
 .../src/dashboard/components/filterscope/FilterScopeSelector.jsx      | 4 ++--
 superset/assets/src/dashboard/reducers/dashboardFilters.js            | 2 +-
 superset/assets/src/dashboard/stylesheets/filter-scope-selector.less  | 1 +
 superset/assets/src/dashboard/util/propShapes.jsx                     | 1 +
 4 files changed, 5 insertions(+), 3 deletions(-)

diff --git 
a/superset/assets/src/dashboard/components/filterscope/FilterScopeSelector.jsx 
b/superset/assets/src/dashboard/components/filterscope/FilterScopeSelector.jsx
index 2df7a0f..59375e1 100644
--- 
a/superset/assets/src/dashboard/components/filterscope/FilterScopeSelector.jsx
+++ 
b/superset/assets/src/dashboard/components/filterscope/FilterScopeSelector.jsx
@@ -41,7 +41,7 @@ import { ALL_FILTERS_ROOT } from '../../util/constants';
 import { dashboardFilterPropShape } from '../../util/propShapes';
 
 const propTypes = {
-  dashboardFilters: dashboardFilterPropShape.isRequired,
+  dashboardFilters: PropTypes.objectOf(dashboardFilterPropShape).isRequired,
   layout: PropTypes.object.isRequired,
 
   updateDashboardFiltersScope: PropTypes.func.isRequired,
@@ -490,7 +490,7 @@ export default class FilterScopeSelector extends 
React.PureComponent {
         <div className="filter-scope-container">
           <div className="filter-scope-header">
             <h4>{t('Configure filter scopes')}</h4>
-            {this.renderEditingFiltersName()}
+            {showSelector && this.renderEditingFiltersName()}
           </div>
 
           {!showSelector ? (
diff --git a/superset/assets/src/dashboard/reducers/dashboardFilters.js 
b/superset/assets/src/dashboard/reducers/dashboardFilters.js
index ef7be16..abf8fb6 100644
--- a/superset/assets/src/dashboard/reducers/dashboardFilters.js
+++ b/superset/assets/src/dashboard/reducers/dashboardFilters.js
@@ -38,7 +38,7 @@ export const DASHBOARD_FILTER_SCOPE_GLOBAL = {
 };
 
 export const dashboardFilter = {
-  chartId: 0,
+  chartId: null,
   componentId: null,
   filterName: null,
   directPathToFilter: [],
diff --git 
a/superset/assets/src/dashboard/stylesheets/filter-scope-selector.less 
b/superset/assets/src/dashboard/stylesheets/filter-scope-selector.less
index dd19a66..6df2826 100644
--- a/superset/assets/src/dashboard/stylesheets/filter-scope-selector.less
+++ b/superset/assets/src/dashboard/stylesheets/filter-scope-selector.less
@@ -88,6 +88,7 @@
       label {
         font-weight: normal;
         margin: 0 0 0 16px;
+        word-break: break-all;
       }
     }
 
diff --git a/superset/assets/src/dashboard/util/propShapes.jsx 
b/superset/assets/src/dashboard/util/propShapes.jsx
index 96e2e7f..6fb83e8 100644
--- a/superset/assets/src/dashboard/util/propShapes.jsx
+++ b/superset/assets/src/dashboard/util/propShapes.jsx
@@ -86,6 +86,7 @@ export const filterIndicatorPropShape = PropTypes.shape({
 export const dashboardFilterPropShape = PropTypes.shape({
   chartId: PropTypes.number.isRequired,
   componentId: PropTypes.string.isRequired,
+  filterName: PropTypes.string.isRequired,
   directPathToFilter: PropTypes.arrayOf(PropTypes.string).isRequired,
   isDateFilter: PropTypes.bool.isRequired,
   isInstantFilter: PropTypes.bool.isRequired,

Reply via email to