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 doesn't close after you select even with closeAfterSelect true #184

Closed
acetinick opened this issue Aug 23, 2021 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@acetinick
Copy link

acetinick commented Aug 23, 2021

Describe the bug
A clear and concise description of what the bug is.

To Reproduce

Using an ajax data feed, in single select mode, after you have selected an option, the dropdown disappears and then loads again a second time.

I have tried setting closeAfterSelect: true, but still doesn't work.

image

image

Expected behavior

In single select mode, would like select to close and lose focus after you selected an option.

Additional context
Add any other context about the problem here.

  • tom-select 2.0rc1
  • OS: Windows
  • Browser Chrome (latest)
@acetinick acetinick added the bug Something isn't working label Aug 23, 2021
@acetinick
Copy link
Author

acetinick commented Aug 23, 2021

I think this was caused by some other code I had in there inside the promise,

for this.clearOptions();

image

@acetinick
Copy link
Author

Example

https://jsfiddle.net/hx3ve14b/1/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant