Search bar feature not working with multi-level grouping (level 0)

Search bar feature not working with multi-level grouping (level 0)

nathan1812nathan1812 Posts: 17Questions: 7Answers: 0

Hi there,

Link to test case: http://live.datatables.net/gumavana/7/edit

Description of problem:
It seems like somehow the search function does not work with the level 0 grouping, but it functions normally with the level 1 grouping though as shown in the picture below... Not sure why but if anyone can help me get it fixed, it'd be tremendously appreciated!

Thanks,

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,330Questions: 26Answers: 4,951
    edited January 2022 Answer ✓

    Thanks for supplying both a test case and video - that is very helpful :smile:

    It seems to be caused by the Smart search mode. You can use search.smart to disable Smart search. More info about Smart search can be found in the search() API docs.
    http://live.datatables.net/gumavana/8/edit

    @allan or @colin can comment on whether there is another option to allow for Smart search to remain enabled.

    Kevin

  • nathan1812nathan1812 Posts: 17Questions: 7Answers: 0

    No problem, Kevin. I'm glad that it helps. Thank you for the answer as well!

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    With smart search, the string is searched across the columns - so when you type "shelf: 1" it searches for "shelf:" and for "1", and as both records match those two strings, they're both returned. You can see this by changing "Shelf: 1" to be "Shelf: 8" - see here and searching for "shelf: 8".

    As Kevin said, disabling the smart search is probably the way to go!

    Colin

Sign In or Register to comment.