Search Builder "searchable=false" behavior seems wrong to me

Search Builder "searchable=false" behavior seems wrong to me

desperadodesperado Posts: 159Questions: 33Answers: 4

I have a datatables instance which uses both the standard search box which searches all columns (lets call it "Quick Search") and searchBuilder.

I have three columns that conflict with each other when using quick search. One is a department name, the next is a department hierarchy from the university level down to the department so it includes the department name and the third is a specific level within the hierarchy which represents a "school" which could also be the department for a given row. This results in "Quick Search" not working if you allow all three columns to be searchable. So I have disabled search for the hierarchy and the school with searchable=false but I allow the search to work across the department column with searchable=true.

Now that I have added searchBuilder I was happy to see the two "non-searchable" columns were still listed in the Search Builder list of columns. However when I base a search on one of these columns no data is returned. If I change the column to searchable and test again then searchBuilder works. So I think search builder is inconstantly honoring the searchable boolean. It either should not include the column in the list of columns you may base your search on or it should include the column in the list and should work as you would expect if that column is searched.

I prefer the later because "Quick Search" needs these two columns to be disabled since it is very basic and looks for data across all columns at the same time, but searchBuilder which addresses each column independently doesn't need to have search disabled and honestly I can't think of a case where you would want to disable a column in searchBuilder.

If anyone thinks it is necessary to be able to disable search on a column in searchBuilder then I think there needs to be two "searchable" booleans. One for the standard search and another for searchBuilder. Perhaps searchBuilderSearchable=false or something like that.


  • desperadodesperado Posts: 159Questions: 33Answers: 4

    @sandy Just tagging you into this question since nobody else is replying. Thanks

Sign In or Register to comment.