Skip to content

Make select act more natively#982

Closed
gojohnnygo wants to merge 0 commit intoJedWatson:masterfrom
gojohnnygo:master
Closed

Make select act more natively#982
gojohnnygo wants to merge 0 commit intoJedWatson:masterfrom
gojohnnygo:master

Conversation

@gojohnnygo
Copy link
Contributor

This PR resolves 948.

Summary

  • Changed behavior for searchable single select only.
  • Workflow 1
    • select has a value
    • ValueComponent clicked (the empty space)
    • the input field will have the text of the ValueComponent's label
    • cursor will be at the end of the text.
  • Workflow 2
    • select has a value
    • ValueComponent's clicked (the value label)
    • the input field will have the text of the ValueComponent's label
    • text will be highlighted (image below). This is similar to the Facebook's search bar behavior.
      screen shot 2016-05-11 at 5 59 38 pm
  • With the changes above, there is one side effect to the options. When you click on the the component, the drop down activates as usual but with only one option: the value the select already has. So the isInitOpen property was added to state so that on first open, all possible options are filtered.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.4%) to 90.397% when pulling 93d4030 on gojohnnygo:master into aa57a93 on JedWatson:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.4%) to 91.149% when pulling 9baf601 on gojohnnygo:master into 781fd43 on JedWatson:master.

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 this pull request may close these issues.

Make Searchable Act More Like Native HTML Input

2 participants