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

Dropdown selection deletion of last letter doesn't work in production, and works ok in development mode #1819

Closed
kunokdev opened this issue Jun 30, 2017 · 4 comments

Comments

@kunokdev
Copy link

kunokdev commented Jun 30, 2017

Steps

Dropdown menu with auto complete.

  1. Enter some text
  2. Start ereasing
  3. Last letter will not be able to be deleted
  4. At that time state.value is actually empty string
  5. When new letter is added value is last letter that remained + new letter written

Expected Result

After deleting last letter, expected result would be to display placeholder value or empty input

Actual Result

Last letter always remains there even if value is empty string

Version

0.68.3

Testcase

I can't reproduce this bug in development mode only in production, you give it a try here: http://hoteli.tmc-solutions.xyz/

Code

<Dropdown
            fluid
            selection
            search
            options={props['location-options']}
            value={props['location-value']}
            placeholder={'Search location'}
            loading={props['location-isFetching']}
            icon={props['location-isFetching'] ? undefined : null}
            onSearchChange={props['location-onSearchChange']}
            onChange={props['location-onChange']}
          />

Container:

        <SearchForm
          location-options={this.state.location_options}
          location-value={this.state.location_value}
          location-onChange={this.location_onChange.bind(this)}
          location-onSearchChange={this.location_onSearchChange.bind(this)}
          ...

I am mostly troubled because this only happens in production and can't be represented in development mode.

@layershifter
Copy link
Member

layershifter commented Jun 30, 2017

Duplicate #1784. Please update to latest, this was fixed in #1722.

@kunokdev
Copy link
Author

Hi @layershifter thanks for fast response. I upgraded my package to 0.70.0 and now I can finally reproduce this bug in development mode. However, it wasn't mentioned what actually caused this bug specifically?

@layershifter
Copy link
Member

In #1690 we added minCharacters prop, it's behaviour wasn't implemented correctly and it caused problem with deletion of first character. #1722 fixed this problem, it was released in 0.69.0.

As I see, all works correct at the page that you linked.

@kunokdev
Copy link
Author

kunokdev commented Jun 30, 2017

@layershifter Thanks! That just reminded me of missing minCharacter is now implemented and other issue I posted some months back is now fixed too, thank you for update!!

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

No branches or pull requests

2 participants