Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Select Component #588

Closed
westwood846 opened this issue Feb 1, 2021 · 7 comments · Fixed by #620
Closed

New Select Component #588

westwood846 opened this issue Feb 1, 2021 · 7 comments · Fixed by #620
Assignees

Comments

@westwood846
Copy link
Contributor

Let's collect the discussion here.

@westwood846
Copy link
Contributor Author

https://github.com/based-ghost/react-functional-select

  • Uses styled-components
  • Small
  • No groups
  • Hard to style

@westwood846
Copy link
Contributor Author

https://github.com/jedwatson/react-select

  • Well-established
  • Lots of functionality
  • Easy to customize
  • Big
  • Uses Emotion

@westwood846
Copy link
Contributor Author

https://github.com/downshift-js/downshift

  • Actually not a component, more like a toolbox for building selects
  • Popular
  • Very minimalist: Still leaves a lot of work to us
  • Maybe not easy to customize, but very flexible
  • Small
  • Unopinionated about styling library

@rosslo
Copy link
Contributor

rosslo commented Feb 1, 2021

https://github.com/react-component/select

@westwood846
Copy link
Contributor Author

westwood846 commented Feb 8, 2021

@rosslo @ritikamotwani I started collecting some (non-technical) requirements here: https://docs.google.com/document/d/18yPN0s17_vhNbIBPBHfQ0zFRtIGn81icPtAwVEmZeBE/edit?usp=sharing

This might help us with making our decision, and with implementation later. Please add requirements or participate in the discussion in the comments.

@westwood846
Copy link
Contributor Author

westwood846 commented Feb 8, 2021

By the way, just in terms of terminology, at Glints we seem to call this thing a "Select" and that's fine because everybody essentially knows what we mean. But online I've seen more nuanced terms:

@ritikamotwani
Copy link
Contributor

Points from the survey:

  • Select - the online documentation assumes that the options are static, but in many of our use cases, we use Select as a searching mechanism and the options are dynamic. So I couldn't decide whether are we "abusing" Select or is it just a lack of examples.
  • Workaround for cleaning up the Select's input value right after one option is selected. https://gitlab.glints.com/glints/glints-dst/-/blob/staging/app/modules/OnboardingGuided/JobPreferences/LocationField/index.tsx#L55
  • Not passing value to Select to avoid it showing the value as the selected value. I want to be able to pass in the value and the Select should then display the corresponding label from the options.
  • Have a multiple select
  • Select. There were some issues when passed with a controlled value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants