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

Selecting an item from a Dropdown menu in search mode (non multi) does not work #513

Closed
rszewczyk opened this issue Sep 20, 2016 · 3 comments · Fixed by #514
Closed

Selecting an item from a Dropdown menu in search mode (non multi) does not work #513

rszewczyk opened this issue Sep 20, 2016 · 3 comments · Fixed by #514
Labels

Comments

@rszewczyk
Copy link

Can reproduce with create-react-app myapp && cd myapp && npm i stardust -S && npm start then change contents of src/index.js to:

import React from 'react'
import ReactDOM from 'react-dom'
import { Dropdown } from 'stardust'

ReactDOM.render(
  <Dropdown
    search
    selection
    options={[{
      value: 1,
      text: 'One'
    }, {
      value: 2,
      text: 'Two'
    }, {
      value: 3,
      text: 'Three'
    }]}
  />,
  document.getElementById('root')
)

Observe that selecting an option by clicking on a menu item does not change the displayed value of the component (selecting via the keyboard does work).

@levithomason
Copy link
Member

This seems to be working on the doc site. However, I'll try the steps noted.

@levithomason
Copy link
Member

I see. This is an issue for the uncontrolled component. The selected (highlighted) item is chosen on blur even when the item click is what triggers the blur.

Fix coming, hang tight...

@levithomason
Copy link
Member

levithomason commented Sep 20, 2016

I've added a doc site example, tests, and a fix for this issue. Released in stardust@0.44.8. Thanks for the report!

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

Successfully merging a pull request may close this issue.

2 participants