question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Dropdown] Clicking on the dropdown icon will generate multiple hits to the server (when no results are returned).

See original GitHub issue

I was just about to upgrade to v2.2.10 when I noticed my remote dropdowns where generating multiple hits to the server when no results are returned. It also looks like the caching parameter is ignored.

For some reason this bug only happens if you click on the actual dropdown icon (you will see the loading icon spin, stop, spin, stop… ).

If you look at the console log you will see multiple repeated requests.

http://jsfiddle.net/kmd1970/pzcm8zo4/ (Please note this link needs to remain http:// for the remote ajax call to work properly)

Looks like this issue started in v2.2.8. In more recent versions (v2.2.7) the dropdown icon doesn’t open the empty menu (after load) until you click into the input at least once, so this issue doesn’t occur.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:3
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
nikolaybobrovskiycommented, Sep 10, 2017

Quick work-around is to define own onSuccess in apiSettings:

onSuccess(response, el) {
	el.dropdown('internal', 'remove').message();
	el.dropdown('internal', 'setup').menu({
		values: response.results
	});
	if (response.results && response.results.length) {
		el.dropdown('show');
	}
}
0reactions
jlukiccommented, Jun 18, 2018

I can see the recursion in the logic here. I’ll add a solve to next patch release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dropdown - Semantic UI
A dropdown allows a user to select a value from a series of options.
Read more >
How To Handle Dropdowns In Selenium WebDriver Using ...
While dealing with access forms, you'd often have to handle dropdown. Here's how you can handle them with Selenium WebDriver in Selenium ...
Read more >
Dropdown | Fomantic-UI Docs
A dropdown allows a user to select a value from a series of options.
Read more >
Power Apps Dropdown Control - Cascading, Filtering, Allow ...
Nothing too crazy, just going through the PowerApps dropdown control in ... Enjoy PowerApps Cascading dropdowns a couple of different ways.
Read more >
Avoid dropdown menu close on click inside - Stack Overflow
To avoid this, I can easily attach a click event handler on the dropdown menu and simply add the famous event.stopPropagation() . <ul...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found