select does not like options value containing raw numerical zero
See original GitHub issueThe input selector acts wiggy when you define it to have an option element that is the number 0.
For instance.
timeZones: [-11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14],
timeZone: 0,
{{#power-select options=timeZones selected=timeZone searchEnabled=false onchange=(action (mut timeZone)) as |opt|}}
{{opt}}
{{/power-select}}
What happens is that the selection is not displayed if the selected is set to 0 and also when you scroll to the selection in the UI it auto-scrolls back to the top of the window.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:7
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Documentation: 15: SELECT - PostgreSQL
All the selected rows are considered to form a single group, and the SELECT list and HAVING clause can only reference table columns...
Read more >Functions, operators, and conditionals | BigQuery
This topic is a compilation of functions, operators, and conditional expressions. To learn more about how to call functions, function call rules, ...
Read more >options: Options Settings - Rdrr.io
Invoking options() with no arguments returns a list with the current values of the options. Note that not all options listed below are...
Read more >Excel: If cell contains formula examples - Ablebits
If a cell contains at least one of the specified substrings, there will be TRUE in the array. The double unary operator (--)...
Read more >Extracting, transforming and selecting features - Apache Spark
Extracting, transforming and selecting features. This section covers algorithms for working with features, roughly divided into these groups:.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
yeah, I’m sure there is at least a couple places where I’m checking something like
if (selectedOption) { do foo }
where I should doif (selectedOption !== undefined) { do foo }
.In my opinion, 0, false and null are perfectly valid options. The only value that should represent the absence of an option, is
undefined
I can reproduce the same unselected behavior with
false
as the value