Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[native filter] Remove parent filter cause incorrect state of child filter #16825

Closed
graceguo-supercat opened this issue Sep 24, 2021 · 0 comments · Fixed by #16876
Closed

[native filter] Remove parent filter cause incorrect state of child filter #16825

graceguo-supercat opened this issue Sep 24, 2021 · 0 comments · Fixed by #16876
Assignees
Labels
#bug Bug report dashboard:native-filters Related to the native filters of the Dashboard P1 Priority item - Major

Comments

@graceguo-supercat
Copy link

graceguo-supercat commented Sep 24, 2021

Expected results

Remove parent filter should update all its children filters to top level filters.

How to reproduce the bug

  1. create dashboard from baby_names dataset. Add a few filters. For example, add Gender filter, State filter, Number filter, and set number filter's parent filter is State filter.
  2. Load dashboard.
  3. Remove State filter.
  4. In dashboard filter bar, you don't see State filter or Number filter. But number filter is still in dashboard's metadata, and it also shows in Filter Sets:
    {
      "id": "NATIVE_FILTER-1VxgvI-iF",
      "controlValues": {
        "multiSelect": true,
        "enableEmptyFilter": false,
        "defaultToFirstItem": false,
        "inverseSelection": false,
        "searchAllOptions": false
      },
      "name": "Number Filter",
      "filterType": "filter_select",
      "targets": [{"datasetId": 2, "column": {"name": "num"}}],
      "defaultDataMask": {
        "extraFormData": {},
        "filterState": {},
        "ownState": {}
      },
      "cascadeParentIds": ["NATIVE_FILTER-wvlKEa4U5"],
      "scope": {"rootPath": ["ROOT_ID"], "excluded": []},
      "chartsInScope": [133],
      "tabsInScope": []
    }

Screen Shot 2021-09-23 at 7 04 53 PM

Screen Shot 2021-09-23 at 7 04 40 PM

Environment

latest master

Additional context

cc @m-ajay @michael-s-molina @junlincc

@graceguo-supercat graceguo-supercat added #bug Bug report dashboard:native-filters Related to the native filters of the Dashboard P1 Priority item - Major labels Sep 24, 2021
@michael-s-molina michael-s-molina self-assigned this Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report dashboard:native-filters Related to the native filters of the Dashboard P1 Priority item - Major
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants