Closed ItsJonQ closed 3 years ago
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/itsjonq/g2/rj4u0814q
✅ Preview: https://g2-git-try-select-dropdown-preview-interaction.itsjonq.vercel.app
This update adds the ability for
SelectDropdown
to "preview" changes when hovering/moving through the items (without committing the change via a click).Example:
This is an opt-in feature, via a
<SelectDropdown isPreviewable />
prop.The best part is the consumer doesn't have to tap into an alternative callback function for the preview function to work. All of that is handled internally between a substate store and Downshift.
For fun, here's the state flow diagram I drew during the Twitch stream today when we were trying to figure this out.
Shout outs to @timothybjacobs for contributing ideas for this interaction!
Resolves https://github.com/ItsJonQ/g2/issues/182