GitHub user dosubot[bot] added a comment to the discussion: Native Filter 
(Preselect and Hidden)

<!-- Greeting -->
Hi @renaldy-dentaled! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping 
the superset team.

<!-- Answer -->
For hiding filters in embedded dashboards, Superset 5.0 introduces a fix that 
allows you to hide filters using the configuration `filters: { visible: false, 
expanded: false }` in your dashboard embedding setup. This did not work in 
4.1.1, but is resolved in [PR 
#29422](https://github.com/apache/superset/issues/33178). If you need to hide 
the filter panel by default globally or per user (not just per dashboard), 
there isn't a built-in option—this requires code customization, or you can use 
URL parameters like `?expand_filters=0` for each dashboard link 
[(details)](https://github.com/apache/superset/issues/32590).

To preselect filter values when embedding, you can pass filter values via URL 
parameters using a JSON structure, for example: `{"filters": [{"col": 
"practice_id", "op": "==", "val": 123}]}` 
[(example)](https://github.com/apache/superset/issues/33512). Default values 
for native filters are only applied on initial render, not when filters are 
cleared [(details)](https://github.com/apache/superset/issues/33361).

If you want to retrieve or control filter state (dataMask) from outside an 
embedded dashboard, this isn't possible yet, but a `getDataMask` method is 
planned for Superset 6.0 
[(roadmap)](https://github.com/apache/superset/discussions/34277).

For quick UI tweaks, you can hide filter indicators with custom CSS like 
`.FilterItem { display: none; }` 
[(tip)](https://github.com/apache/superset/discussions/31456).


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*

---
<sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/b0df8485-7e31-40bc-a2ce-d514ffb3cace?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/b0df8485-7e31-40bc-a2ce-d514ffb3cace?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/b0df8485-7e31-40bc-a2ce-d514ffb3cace?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/b0df8485-7e31-40bc-a2ce-d514ffb3cace?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/b0df8485-7e31-40bc-a2ce-d514ffb3cace?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/b0df8485-7e31-40bc-a2ce-d514ffb3cace?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/b0df8485-7e31-40bc-a2ce-d514ffb3cace?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat
 with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&
 nbsp;[![Join 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/34873)

GitHub link: 
https://github.com/apache/superset/discussions/34873#discussioncomment-14238181

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: 
notifications-unsubscr...@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to