day8 / re-com

A ClojureScript library of reusable components for Reagent
https://re-com.day8.com.au
MIT License
796 stars 147 forks source link

Filter issue when using hiccup for labels in multi-select #304

Closed Gregg8 closed 7 months ago

Gregg8 commented 2 years ago

When using hiccup for labels in the multi-select component, the filter text boxes end up searching within the entire hiccup.

For example, if a label contains [:div {:style {:color "red"} "Violets are blue"] then the filter text boxes would match this line if you type "red".

One suggestion would be to add a :search-text-fn argument which returned "Violets are blue" in the above example.

This could just be a keyword (e.g. point it right back to the :label data) which already contains the original string. That being the case, the sensible default for :search-text-fn would be :label.