openlawteam / openlaw-elements

Render React form components and sections from an OpenLaw template.
https://docs.openlaw.io/openlaw-elements/
Apache License 2.0
15 stars 11 forks source link

Address: use Downshift because it's awesome. #108

Open jtrein opened 4 years ago

jtrein commented 4 years ago

Autosuggest needs updates, and I'd prefer rather than to continue using it to use a newer take on autosuggest boxes, https://github.com/downshift-js/downshift.

We already use it for the Address component inside of LAO front-end app and it's easier to configure and set default "searching" text than what I've hacked together in Autosuggest.

Autosuggest also needs some package updates to stop some React warnings and the maintainer has been slow to update anything around this. Time to use a more up-to-date lib.

jtrein commented 4 years ago

Testing should be much easier as well. The address component is a bit of a pain to test with Autosuggest. Downshift also helps with usability; I had to customize some things in the behaviours of Autosuggest to get it be usable with our multiple async actions (searching then creating an address).