You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "srijani-smsrc (via GitHub)" <gi...@apache.org> on 2025/10/17 11:58:37 UTC
[D] filters [superset]
GitHub user srijani-smsrc created a discussion: filters
which file sends the api call to backend database when we apply filters in dashboard
give me the file path from frontend acepting the values to backend api call
@rdubois
GitHub link: https://github.com/apache/superset/discussions/35715
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] filters [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
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> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&
nbsp;[](https://go.dosu.dev/discord-bot) [](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 notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [D] filters [superset]
Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
GitHub user dosubot[bot] edited a comment on 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?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*
---
Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset).
[](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=1c326128-7773-4f74-8909-b73b3efabf8a) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset)
GitHub link: https://github.com/apache/superset/discussions/35715#discussioncomment-14709028
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org