esentis / multiple_search_selection

A highly customizable multiple selection widget with fuzzy search functionality.
https://pub.dev/packages/multiple_search_selection
BSD 3-Clause "New" or "Revised" License
11 stars 13 forks source link

configure search case sensitivity #20

Closed anqit closed 1 year ago

anqit commented 1 year ago

Addresses issue #19

esentis commented 1 year ago

Thanks for the contribution @anqit . With the next release 2.3.3 all changes will be live. Closes #19

anqit commented 1 year ago

Thanks for the contribution @anqit . With the next release 2.3.3 all changes will be live. Closes #19

Good to hear, any idea when that might be? Also curious, why is it that there are a couple places where the fuzzy search doesn't happen, only the contains() check?

esentis commented 1 year ago

It is already live. About the Fuzzy search, maybe I missed it. I'll look into it later or feel free to make a PR 😁

anqit commented 1 year ago

Awesome, thanks for the quick turnaround. I reference the fuzzy search differences here https://github.com/esentis/multiple_search_selection/pull/20#discussion_r1087477558 and https://github.com/esentis/multiple_search_selection/pull/20#discussion_r1087477317

esentis commented 1 year ago

@anqit Ok I have taken a look at the fuzzy search, and indeed the fuzzy search was not performed always. Now that you have refactored the search logic to the method _searchAllItems it is easier to see where the search is performed, and I'm using :

_searchAllItems(
      _textEditingController.text,
      fuzzy: widget.fuzzySearch != FuzzySearch.none,
    )

Thanks for pointing it out, if you find any other issues or please feel free to open another issue. The fix is already available live with the version 2.3.5.

anqit commented 1 year ago

@anqit Ok I have taken a look at the fuzzy search, and indeed the fuzzy search was not performed always. Now that you have refactored the search logic to the method _searchAllItems it is easier to see where the search is performed, and I'm using :

_searchAllItems(
      _textEditingController.text,
      fuzzy: widget.fuzzySearch != FuzzySearch.none,
    )

Thanks for pointing it out, if you find any other issues or please feel free to open another issue. The fix is already available live with the version 2.3.5.

Ok cool, just wasn't sure if there was a specific reason or not. If we do want to always do fuzzy search, we can just get rid of that parameter altogether, and just rely on the widget.fuzzySearch value.

But thanks for the quick fix!

esentis commented 1 year ago

Yes indeed, I could try checking inside the _searchAllItems about the fuzzy flag instead of passing it as parameter. Since this is not breaking anything, I will tweak it on next release.