How to show list current filter in Resource list

375 views Asked by At

I'm using resource list control of polaris. I have add some filter conditions and my list displayed with correct data. But i don't see current list filter area where i can remove my conditions. How to display it? This is my filter declaretion, I wonder is it some problem with my appliedFilters variable.

 filterControl={
                    <ResourceList.FilterControl
                      resourceName={resourceName}
                      filters={availableFilters}
                      appliedFilters={appliedFilters}
                      onFiltersChange={this.handleFiltersChange}
                      searchValue={searchValue}
                      onSearchChange={this.handleSearchChange}             
                    />
                  }
1

There are 1 answers

0
Dũng Nguyễn On BEST ANSWER

you need set again data for appliedFilters on onFiltersChange event to display current filter list. i suggest you store this variable in local state of component as code bellow:

this.setState({ appliedFilters:appliedFilters});