GitHub user dosubot[bot] added a comment to the discussion: filters

<!-- Answer -->
The main frontend file that sends API calls to the backend when you apply 
filters in a dashboard is 
[`superset-frontend/src/dashboard/components/nativeFilters/FilterBar/keyValue.tsx`](https://github.com/apache/superset/blob/master/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/keyValue.tsx).
 This file uses functions like `updateFilterKey`, `createFilterKey`, and 
`getFilterValue` to send PUT, POST, and GET requests to the backend via the 
`/api/v1/dashboard/{dashId}/filter_state` endpoints when filter values change.

The flow starts with filter input in the dashboard UI, which updates the Redux 
state (handled by files like 
[`superset-frontend/src/dashboard/reducers/dashboardFilters.js`](https://github.com/apache/superset/blob/master/superset-frontend/src/dashboard/reducers/dashboardFilters.js)),
 and then triggers the API calls in `keyValue.tsx` to persist or fetch filter 
state from the backend. For saving the dashboard state with filters, the API 
call is made in 
[`superset-frontend/src/dashboard/actions/dashboardState.js`](https://github.com/apache/superset/blob/master/superset-frontend/src/dashboard/actions/dashboardState.js)
 using the `saveDashboardRequest` function.

Let me know if you need details on the UI component or the backend endpoint!


<!-- 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/934f9ef2-75ae-40d2-ad9c-e0f25e331dcc?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/934f9ef2-75ae-40d2-ad9c-e0f25e331dcc?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/934f9ef2-75ae-40d2-ad9c-e0f25e331dcc?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/934f9ef2-75ae-40d2-ad9c-e0f25e331dcc?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/934f9ef2-75ae-40d2-ad9c-e0f25e331dcc?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/934f9ef2-75ae-40d2-ad9c-e0f25e331dcc?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/934f9ef2-75ae-40d2-ad9c-e0f25e331dcc?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/35716)

GitHub link: 
https://github.com/apache/superset/discussions/35716#discussioncomment-14709035

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


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

Reply via email to