Search code examples
filterbootstrap-4bootstrap-table

fetch only fully matched results by bootstrap-table-filter-control


I searched a lot to find the filter option done by bootstrap-table-filter-control to get the exact matched output rather than from the partial matched output,but i couldn't got an solution for this.Is there any method?


Solution

  • take this fiddle for example (without strict search):

    https://jsfiddle.net/eitanmg/ao5ybwvr/1/
    

    and this fiddle (with strict search):

    https://jsfiddle.net/eitanmg/ao5ybwvr/2/
    

    When search for the number 219 in the search text box, if filterStrictSearch is false the results will be both rows that match 219 and 2199. And when filterStrictSearch is true the result will be only 219.

    if you are passing the filterStrictSearch: true via html it become data-strict-search="true"