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: Controlled Dropdown component ignores spaces

See original GitHub issue

Bug Report

Steps

Create a controlled Dropdown component and by controlled I mean setting the open prop manually. Then, add a debounced onSearchChange callback. The problem here apparently stems from the fact that I am setting open prop in a debounced function. After first call of this function I am able to properly type words separated by a space.

Expected Result

Changing the search query would properly register each character.

Actual Result

Apparently typing e.g. adam tr ignores the space in between the words.

Version

0.82.4

Testcase

https://codesandbox.io/s/ppxwk52xqx

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mic4aelcommented, Sep 14, 2018

Why does it even behave like this? Why should the dropdown show the options after typing a space? I can’t come up with a good usecase for a situation where I would like the dropdown to be open on pressing space.

0reactions
layershiftercommented, Aug 20, 2020

A fix was released in semantic-ui-react@1.2.1 🎉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Preserve whitespace in HTML select element options using ...
The usual workaround to keep whitespace from collapsing into 1 space in <option> s is to use   instead of usual spaces. eg....
Read more >
Optimize your react-select component to smoothly render ...
Let's look into a couple of different ways of how to improve the performance of this react-select component. 1. Set ignoreAccents to false....
Read more >
Drop down shows values followed by white space - Telerik
Hello, I want to remove white space in drop down values in blazor. ... which controls the height of the expanded dropdown list...
Read more >
hide & move items's to dropdown when space runs out
Ideally this would be a div and not a select element. The icon/button wouldn't be displayed if there was enough horizontal space for...
Read more >
Explore auto layout properties - Figma Help Center
Auto layout is a property you can add to frames and components. ... To use canvas controls, select and hover over the auto...
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