day8 / re-com

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

For dropdown, the validation for choices is too strict if id-fn and label-fn are provided #81

Open ducky427 opened 8 years ago

ducky427 commented 8 years ago

Currently, a single-dropdown requires the choices to be a vector-of-maps. But if a user specifies the id-fn and label-fn, then strictly speaking, each entry in that vector doesn't need to be a map.

metasoarous commented 8 years ago

This just hit me as well. I was hoping to be able to do a DataScript query and pass a vector of vectors from it as options, with first and second as id-fn and label-fn respectively, but got no love. Not a huge deal to have to munge into maps, but would be nice not to have to :-)