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

<!-- Answer -->
The main file that sends the API call 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 contains functions like `updateFilterKey`, `createFilterKey`, and 
`getFilterValue` that handle PUT, POST, and GET requests to the 
`/api/v1/dashboard/{dashId}/filter_state` endpoints when filter values are 
applied or updated in the dashboard UI.

The flow typically starts with the filter UI components (such as those in the 
`FilterBar`), which accept user input. When a filter is applied, these 
functions are called to send the new filter state to the backend API. You can 
see the relevant logic and API calls directly in 
[`keyValue.tsx`](https://github.com/apache/superset/blob/master/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/keyValue.tsx)
 
[citation](https://github.com/apache/superset/blob/master/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/keyValue.tsx).

For managing the overall dashboard state and serializing filter values/scopes 
before saving or updating the dashboard, see 
[`superset-frontend/src/dashboard/actions/dashboardState.js`](https://github.com/apache/superset/blob/master/superset-frontend/src/dashboard/actions/dashboardState.js)
 
[citation](https://github.com/apache/superset/blob/master/superset-frontend/src/dashboard/actions/dashboardState.js).

Let me know if you need more details on the UI components or the Redux flow!


<!-- 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/1c326128-7773-4f74-8909-b73b3efabf8a?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/1c326128-7773-4f74-8909-b73b3efabf8a?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/1c326128-7773-4f74-8909-b73b3efabf8a?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/1c326128-7773-4f74-8909-b73b3efabf8a?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/1c326128-7773-4f74-8909-b73b3efabf8a?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/1c326128-7773-4f74-8909-b73b3efabf8a?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/1c326128-7773-4f74-8909-b73b3efabf8a?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/35715)

GitHub link: 
https://github.com/apache/superset/discussions/35715#discussioncomment-14709028

----
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