[Feature Request] w2grid: Be capable of specifying different fields for simple-search and advanced-search.
See original GitHub issue-
I’m submitting a … [ ] bug report [x] feature request [ ] question about the decisions made in the repository
-
What is the current behavior? Currently developers can provides searches property for a grid to specifed what fields they want to search for. But they cannot specify different fields individually for the simple-search mode and advanced-search mode. For example, there is a grid that we want only 3 fields in the simple-search mode to do a fuzzy searching, meanwhile in advanced-search mode of this grid we would want 8 fields to do more complex and stricter filtering. I notice that each search filter has a
simple: t/fproperty, which can specify this field should show or not in simple-seach mode. But whether the field shows or not on the simple-search dropdown menu, its value always be submitted to server when triggering a ‘All Fields’ search. For end users this is very confusing because they cannot see those extra search fields in the dropdown menu at all. -
What is the expected behavior? If a search field’s property ‘simple’ is set to false, it only shows and takes effect in advance-search mode, not in the simple-search mode.
-
Other information I am using w2ui-1.5.rc1 version.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (2 by maintainers)

Top Related StackOverflow Question
Hi @pidlo ,
Thanks for your help. Yes we can prepare/modify the searchData before sending search request, just like your code as well as my code above show. However, this requirement is so common that almost every grid with search will need to handle this. So I prefer it would be handled by default by framework, not by application developers. I suppose that would make developers pleased. Hope I am not asking for too much. 😃
The use of simple is correct. However in 2.0 there are plans to significantly change search, so the simple property might or might not stay. Because of this, I am closing this issue.