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

   <!-- Greeting -->
   Hello @harelorinctera! I'm [Dosu](https://dosu.dev), a friendly bot here to 
help you with bugs, answer your questions, and assist you in becoming a 
contributor. I'm here while you wait for a human maintainer. How can I assist 
you today?
   
   <!-- Answer -->
   The issue you're experiencing with the "Clear All Filters" button setting a 
required time filter to 'No filter' seems to be related to how Superset handles 
default values and required filters. When the "Clear All Filters" button is 
used, Superset should ideally reset the filter to its default value instead of 
clearing it entirely, especially if the filter is marked as required.
   
   The logic for handling default values in native filters involves checking 
configurations like `defaultToFirstItem` and `enableEmptyFilter`. If 
`defaultToFirstItem` is enabled, the default value is set to the first item 
automatically. If `enableEmptyFilter` is false, a default value must be set 
when the filter is required 
<sup>[[1]](https://github.com/apache/superset/blob/master/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/state.ts)</sup><sup>[[2]](https://github.com/apache/superset/blob/master/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DefaultValue.tsx)</sup>.
   
   In your case, it seems that the required time filter is not reverting to its 
default value when "Clear All Filters" is triggered, which leads to the backend 
query error due to the absence of a valid timestamp. This behavior might be a 
bug in the current version of Superset (4.0.2) you are using.
   
   To address this, you might want to ensure that the default value logic is 
correctly implemented in your filter configuration. If the issue persists, it 
may require a fix in the Superset codebase to ensure that required filters 
revert to their default values when cleared, rather than being set to 'No 
filter'.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   
   ---
   <sup>Help Dosu learn! Give it feedback: [Great 
Response](https://app.dosu.dev/response-feedback/61265cff-7c6f-41a0-8e40-f409bbb448f4?feedback_type=great_response)
 | [Irrelevant 
Answer](https://app.dosu.dev/response-feedback/61265cff-7c6f-41a0-8e40-f409bbb448f4?feedback_type=irrelevant_answer)
 | [Incorrect 
Sources](https://app.dosu.dev/response-feedback/61265cff-7c6f-41a0-8e40-f409bbb448f4?feedback_type=incorrect_sources)
 | [Too 
Verbose](https://app.dosu.dev/response-feedback/61265cff-7c6f-41a0-8e40-f409bbb448f4?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/61265cff-7c6f-41a0-8e40-f409bbb448f4?feedback_type=hallucination)
 | [Bug 
Report](https://app.dosu.dev/response-feedback/61265cff-7c6f-41a0-8e40-f409bbb448f4?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/61265cff-7c6f-41a0-8e40-f409bbb448f4?feedback_type=other)</sup>
   


-- 
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: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.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