AllenFang / AllenFang/react-bootstrap-table

Clear search input field and column filter input field dynamically

Đang mở
#2,054 5 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
2.2k
Fork
761
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.