Vitor-Avila commented on PR #29422:
URL: https://github.com/apache/superset/pull/29422#issuecomment-2773442970

   @rusackas @michael-s-molina I restored the code from that PR locally (on top 
of `master`) to 
`superset-frontend/src/dashboard/components/DashboardBuilder/state.ts`:
   * declared this `const`:
   ``` ts
   const showNativeFilters = useSelector<RootState, boolean>(
       state => (getUrlParam(URL_PARAMS.showFilters) ?? true),
     );
   ```
   * Updated the definition for `nativeFiltersEnabled` to:
   ``` ts
   const nativeFiltersEnabled =
     showNativeFilters &&
     (canEdit || (!canEdit && filterValues.length !== 0));
   ```
   
   Still, when loading a dashboard with `show_filters=false`, the filter bar is 
visible and expanded. It seems we also need a change in 
`superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx`
 similar to this PR:
   ``` tsx
   const showFilterBar = !editMode && nativeFiltersEnabled;
   ```
   
   Would it be better to build on top of this open PR or create a new one?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to