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.

searchField required although searchEnabled=false

See original GitHub issue

Assertion Failed: {{power-select}} If you want the default filtering to work on options that are not plain strings, you need to provide searchField"

With search disabled there should be no need to set the searchField?

I just noticed: It still “searches” and scrolls the list to a match even without the search input. I know this is also the default select UX but imho this is a little odd.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
cibernoxcommented, Feb 20, 2019

Sorry for missing this. The search field is mandatory even if you disable the searchbox, because the searchbox is not the only way to search in a select. Like in native selects, when the select is closed and you press keys, it’s going to select cycle through the values that start with that letter.

It’s easier to see with an example. Go to https://ember-power-select.com/docs/the-search and in the Disable the search box section, focus the single select and press “L” and you’ll see that “Lauren” gets selected.

The behavior is actually more complex than that even. If you had a select of all the countries sorted alphabetically and you type “U”, “Uganda” would be selected. If you wait more than 200ms and type “U” again the selection will change to “Ukaine”. If instead you would have typed “U” and then in less than 200ms “N”, you have selected “United Arab Emirates”. And if you wait for more than one second you the temporary search is reset and the next time you press a key will be considered a new search.

It seems subtle, but reproducing exactly the behavior of native selects is indeed full of subtleties.

That’s why a searchField string (or search) action is required even if you don’t want a searchbox.

0reactions
rwwagner90commented, Jun 21, 2022

@cibernox shouldn’t this be documented and throw assertions then? Right now, if you think you are not doing any search and leave off these values, there is no assertion, but then if the user presses a key, you get an error and your app blows up.

Read more comments on GitHub >

github_iconTop Results From Across the Web

roda/roda-wui.properties at master · keeps/roda - GitHub
RepresentationInformation.relation.requires.i18n = ui.search.fields. ... CreateActionJob_representationInformation.search.enabled = false. ui.lists.
Read more >
ArcSight ESM 7.2 Service Pack 1 Release Notes - Micro Focus
Valid license from Micro Focus required for possession, use or copying. The information contained herein is subject to change without notice.
Read more >
UC1 Desktop Basic (XSI) Config Guide.docx - Cisco Community
Only a system-level device profile type is required. There is no need to create ... The Search however is conducted over https: Configuration...
Read more >
(UC-One for Desktop) Configuration Guide
Edited BroadWorks requirements for Meet- ... Hide voice mail settings has different possible values, but the same DM tag.
Read more >
Falcon Sandbox v8.30 © Hybrid Analysis
Sends traffic on typical HTTP outbound port, but without HTTP header ... Uses a User Agent typical for browsers, although no browser was...
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