dosubot[bot] commented on issue #38341:
URL: https://github.com/apache/superset/issues/38341#issuecomment-3984442934

   <!-- Answer -->
   This is a known issue with "Select first filter value by default" and 
dependent filters. There's actually an [open issue 
#37393](https://github.com/apache/superset/issues/37393) tracking this exact 
behavior in version 6.0.0 - dependent filters don't apply or clear properly 
when using this option.
   
   **Why the error message is confusing:** The [error attribution 
logic](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/dashboard/components/DashboardBuilder/state.ts#L55-L61)
 doesn't account for filter dependencies. It simply lists all filters with 
`requiredFirst=true` that have undefined values, so when Filter2 (child) fails 
to initialize, Filter1 (parent) gets incorrectly blamed because it also shows 
as uninitialized at that moment.
   
   **Root cause:** The child filter requests its data before the parent filter 
value is set, causing initialization to fail. [PR 
#34137](https://github.com/apache/superset/pull/34137) was supposed to fix this 
in July 2025, but [#37393](https://github.com/apache/superset/issues/37393) 
indicates a regression in 6.0.0.
   
   **Workarounds:**
   1. Use explicit default values via the "DEFAULT VALUE" dropdown instead of 
"Select first filter value by default"
   2. Only enable "Select first filter value by default" on the parent filter, 
not on dependent/child filters
   3. Watch issue #37393 for updates on a fix
   
   
   <!-- 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/7b91698f-8074-4979-a3ec-cf1a333ded1a?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/7b91698f-8074-4979-a3ec-cf1a333ded1a?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/7b91698f-8074-4979-a3ec-cf1a333ded1a?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/7b91698f-8074-4979-a3ec-cf1a333ded1a?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/7b91698f-8074-4979-a3ec-cf1a333ded1a?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/7b91698f-8074-4979-a3ec-cf1a333ded1a?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/7b91698f-8074-4979-a3ec-cf1a333ded1a?feedback_type=other)</sup>
   
   [![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20is%20a%20known%20issue%20with%20%22Select%20first%20filter%20value%20by%20default%22%20and%20dependent%20filters.%20There%27s%20actually%20an%20%5Bopen%20issue%20%2337393%5D%28https%3A//github.com/apache/superset/issues/37393%29%20tracking%20this%20exact%20behavior%20in%20version%206.0.0%20-%20dependent%20filters%20don%27t%20apply%20or%20clear%20properly%20when%20using%20this%20option.%0A%0A%2A%2AWhy%20the%20error%20message%20is%20confusing%3A%2A%2A%20The%20%5Berror%20attribution%20logic%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/dashboard/components/DashboardBuilder/state.ts%23L55-L61%29%20doesn%27t%20account%20for%20filter%20dependencies.%20It%20simply%20lists%20all%20filte
 
rs%20with%20%60requiredFirst%3Dtrue%60%20that%20have%20undefined%20values%2C%20so%20when%20Filter2%20%28child%29%20fails%20to%20initialize%2C%20Filter1%20%28parent%29%20gets%20incorrectly%20blamed%20because%20it%20also%20shows%20as%20uninitialized%20at%20that%20moment.%0A%0A%2A%2ARoot%20cause%3A%2A%2A%20The%20child%20filter%20requests%20its%20data%20before%20the%20parent%20filter%20value%20is%20set%2C%20causing%20initialization%20to%20fail.%20%5BPR%20%2334137%5D%28https%3A//github.com/apache/superset/pull/34137%29%20was%20supposed%20to%20fix%20this%20in%20July%202025%2C%20but%20%5B%2337393%5D%28https%3A//github.com/apache/superset/issues/37393%29%20indicates%20a%20regression%20in%206.0.0.%0A%0A%2A%2AWorkarounds%3A%2A%2A%0A1.%20Use%20explicit%20default%20values%20via%20the%20%22DEFAULT%20VALUE%22%20dropdown%20instead%20of%20%22Select%20first%20filter%20value%20by%20default%22%0A2.%20Only%20enable%20%22Select%20first%20filter%20value%20by%20default%22%20on%20the%20parent%20filter%2C%2
 
0not%20on%20dependent/child%20filters%0A3.%20Watch%20issue%20%2337393%20for%20updates%20on%20a%20fix)&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/issues/38341)


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