GitHub user Yisel-Hernandez created a discussion: Cascading Filter Issue: Child 
filter doesn't reset when parent value changes

Hi, I'm using Apache Superset and running into an issue with cascading native 
filters in a dashboard.

I have a parent filter (Site) and a child filter (Component). The child filter 
is configured with:
{
      "id": "NATIVE_FILTER-K-k_4jJoM",
      "controlValues": {
        "sortAscending": true,
        "enableEmptyFilter": true,
        "defaultToFirstItem": true,
        "multiSelect": false,
        "searchAllOptions": false,
        "inverseSelection": false
      },
      "name": "Componente",
      "filterType": "filter_select",
      "targets": [{"datasetId": 365, "column": {"name": "nombre_componente"}}],
      "defaultDataMask": {
        "extraFormData": {},
        "filterState": {},
        "ownState": {}
      },
      "cascadeParentIds": ["NATIVE_FILTER-amK8JRGA0"],
      "scope": {
        "rootPath": [
          "TAB-tpe3mv-5Oa",
          "TAB-ho9n8npTM",
          "TAB-DOaelJN57",
          "TAB-zEkoj8Ph1",
          "TAB-OmjOSn74N",
          "TAB-2Ke-ZoV_B",
          "TAB-TcdA4-Ir4"
        ],
        "excluded": []
      },

The expected behavior is that when the user selects a new Site, if the 
previously selected Component is no longer valid for that Site, the Component 
filter should automatically reset to empty (null).

However, what currently happens is that the Component filter retains its 
previous value, even if it’s no longer part of the valid options for the new 
Site. This leads to incorrect or empty query results unless the user manually 
resets the filter.

Is this the expected behavior, or is it a bug? Is there a workaround or an 
additional setting that would allow the child filter to reset when the parent 
changes?

Thanks in advance for your help!

GitHub link: https://github.com/apache/superset/discussions/35245

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