Skip to content

Fix async with multiselect#1612

Closed
dekelb wants to merge 2 commits intoJedWatson:masterfrom
dekelb:bugfix/async_multi
Closed

Fix async with multiselect#1612
dekelb wants to merge 2 commits intoJedWatson:masterfrom
dekelb:bugfix/async_multi

Conversation

@dekelb
Copy link
Contributor

@dekelb dekelb commented Mar 21, 2017

This PR fixes #1542 and #1561
Original PR that caused this issue: #1508

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 92.45% when pulling b321f10 on dekelb:bugfix/async_multi into 93c3009 on JedWatson:master.

@dekelb
Copy link
Contributor Author

dekelb commented Mar 24, 2017

@JedWatson Did you manage to check this pr? Will appreciate if you can merge and release a new version as this fix a really important to solve the problematic behavior of the current async multiselect.

Thanks!

@dekelb
Copy link
Contributor Author

dekelb commented May 26, 2017

@JedWatson, @agirton now that this package get a bit more attention, can you please check this pr? Thanks!

@agirton
Copy link
Collaborator

agirton commented May 26, 2017

Hi @dekelb thank you for your contribution. It seems like this would call the API multiple times, what's the primary goal for adding the additional method calls?

@dekelb
Copy link
Contributor Author

dekelb commented May 26, 2017

@agirton the main issue was introduced in https://github.com/JedWatson/react-select/pull/1508/files, in my code I was trying to revert that issue and fix the original problem there.

The original problem was that when the value was changed, the internal list was not cleared, and there was nothing to show after choosing the first value. Clearing the internal state with this._onInputChange(''); fixed that.

@ericnewcomer
Copy link

This is the same issue described in #1753 as well, so I'm behind getting a solution merged for this. Haven't looked through this PR yet, but reissuing the empty query is along the lines of what I was proposing.

@agirton
Copy link
Collaborator

agirton commented Jun 4, 2017

Hi @dekelb haven't pulled this down locally, but couldn't you solve this by just removing the clearOptions method call without having to add two additional inputChange calls?

@dekelb
Copy link
Contributor Author

dekelb commented Jun 6, 2017

@agirton I tried using this.clearOptions but it didn't work (maybe it's related to some other issues, it looks like it doesn't trigger the relevant callbacks, setting focus for example, getting the relevant list of items, etc). I know this package is getting better attention these days, maybe now with some other fixes the this.clearOptions will work, I admit that I didn't try it in v1.0.0-rc.5

@gwyneplaine
Copy link
Collaborator

thanks for this @dekelb, this has been fixed in a separate body of work by @JedWatson,
outlined here #1542 (comment)
you can find the commit here c7fe6f4

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.

Async Multiselect, options dropdown hides every time an option selected

5 participants