playcanvas / pcui

UI component library for web-based tools
http://playcanvas.github.io/pcui
MIT License
668 stars 65 forks source link

Provide more control for tree searching #124

Open willeastcott opened 3 years ago

willeastcott commented 3 years ago

Currently, searching tree items does a fuzzy match.

https://github.com/playcanvas/pcui/blob/master/src/helpers/search.js#L3

Sometimes, it is useful to just search based on exact matches.

Allowing the developer/end-user the ability to select a match type would be useful.

Maksims commented 3 years ago

Indeed. I believe better sorting of search results - would do a great job here:

  1. Exact matches first (case insensitive)
  2. Partial matches then (case insensitive)
  3. Fuzzy matches based on string distance then

Also an ability to search by tag, just like for assets: [enemy], [level-1, mob], etc.