day8 / re-com

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

enter key not working with typeahead #188

Open soulflyer opened 5 years ago

soulflyer commented 5 years ago

I'm trying to allow for arbitrary strings as well as suggestions from the typeahead list. It's only possible if the arbitrary string is not a substring of any of the suggestions. There is no response to an enter keypress, but tab works. If there are no possible completions, this will successfully send the arbitrary string. If there are any, it just tabs to the first possible completion and wont pass the arbritary string.

I can see this behaviour on the demo page by setting rigid? false and change-on-blur? true and trying to pass the string "he". This doesn't work, but passing the string "help-me" does as there are no further completions from that.

soulflyer commented 5 years ago

typeahead is now ignoring the return key completely when :rigid? is set to false and change-onblur? is tue

kimo-k commented 10 months ago

Hey, thanks for waiting 5 years for this small fix, haha.

I think I know what to do, but it's hard to be sure. Try describing the behavior in a way that's explicit, positive and comprehensive. It's hard to sort out the behavior you want from the nos, buts and implied good/bad statements.