Semantic-ui-react: Dropdown selection sets value on blur

Created on 19 Dec 2016  路  3Comments  路  Source: Semantic-Org/Semantic-UI-React

It might sound related to recently fixed #1019 but it actually triggered me to report this issue. :)

This is Semantic UI:

2016-12-19_11-37-25

This is React SUI:

2016-12-19_11-40-41


Steps

  1. Open a dropdown selection, which have no value set.
  2. Blur the dropdown.

Expected Result

The value should not be changed. "Empty" dropdown should stay in "empty" state.

Actual Result

It sets the first value from dropdown. Blurring actually fires onChange event, even with selected value but not changed.

Version

0.62.3

Testcase

n/a or just use the docs

Most helpful comment

Is it just me, or should false be the default for this...

All 3 comments

There's a selectOnBlur prop on Dropdown that defaults to true. I think setting this to false will fix your issue:

<Dropdown selectOnBlur={false} /* other props */ />

If that doesn't fix it, feel free to reopen.

Is it just me, or should false be the default for this...

@mweiczorek of course it should

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jayphelps picture jayphelps  路  3Comments

levithomason picture levithomason  路  3Comments

ryanpcmcquen picture ryanpcmcquen  路  3Comments

levithomason picture levithomason  路  3Comments

GautierT picture GautierT  路  3Comments