-
Notifications
You must be signed in to change notification settings - Fork 38
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
Feature/1 input search select #59
base: develop
Are you sure you want to change the base?
Conversation
@@ -0,0 +1,185 @@ | |||
import React, { Component } from 'react'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i know this is based on the DS component, but i always found it confusing, because when you "select" something it doesn't look like you have chosen the option, and you can delete the text completely and think it's not still selected.
on some apps i've done other variations, like replacing it with a tag, or putting a tag within the input. or on ad manager we clear the input whenever something is selected and someone changes the search term input in any way. what do you think?
this.setState({ searchTerm: '', isOpen: false }); | ||
this._removeListeners(); | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be good to have a default search filter, as we have for SearchMultiSelect, to filter the options in the current options list.
13583a4
to
b16cd06
Compare
Addresses #1
<SearchSelect>
allows for external options to be provided and selected through a dropdown menu, such as a text input that calls an API endpoint for autocomplete options.Expected behaviors
onChange
after thedebouncedTime
has elapsedonSelect
handler with the selected data when an option has been clickedTODO