AllenFang / AllenFang/react-bootstrap-table

Clear search input field and column filter input field dynamically

Aberta
#2,054 5 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
JavaScript
Estrelas
2.2k
Forks
761
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

> #### Current use-case

I am using default search and column filter and both search and filter change are handled remotely using `onSearchChange()` and `onFilterChange()` functions.

After reading through few existing issues, I could understand that when using remote the search change and filter change are standalone and it is on the developer on how to use them.

> #### Issue
Since the global search and filter search are handled separately now, I would want to clear the `searchField` text when the user does a column filter search (inside `onFilterChange()` func.) and vice-versa so the user is aware of this standalone behaviour.
To clear the column filter we could use `cleanFiltered()` function by specifying a `ref` to that column. But, this would fire the `onFilterChange()` and since we have many columns, it is fired for every clear filter case.
I am not aware of how to clear the global search field.

> #### Expected Solution
How to set the `searchField` text value to `""` and similarly for the column filterField value, without firing the onSearchChange or onFilterChange functions?

@AllenFang

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.