menuSelect Widget: hide when only one option (other than seeAllOption)
See original GitHub issueDescribe the bug 🐛
When using a menuSelect
widget, if there is only one option (other than the seeAllOption
), this widget should be hidden since selecting that single option is the same as selecting the seeAllOption
To Reproduce 🔍 Steps to reproduce the behavior:
- Add a
menuSelect
widget that will only have one option - See that selecting that option is the same as the
seeAllOption
Expected behavior 💭
If there is only one option other than the seeAllOption
this widget should be hidden.
Screenshots 🖥
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
menuSelect | InstantSearch.js - Algolia
An InstantSearch.js widget that lets users refine search results by selecting a value from a menu.
Read more >How to hide a <option> in a <select> menu with CSS?
For HTML5, you can use the 'hidden' attribute. <option hidden>Hidden option</option>. It is not supported by IE < 11. But if you need...
Read more >How to Display/Hide Widgets Only on Select Pages
How to display a widget only on some pages and hide it on other pages? How do you restrict a widget from appearing...
Read more >How to show/hide widget based on the another widget selection
I want to display or hide a widget based on the selection option ... and then in each of the list widgets we'll...
Read more >The Alma User Interface - Ex Libris Knowledge Center
To display or hide a widget on the Alma home page: ... Select an option to navigate to the relevant page and close...
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
Since InstantSearch.js 3, you can use the
panel
widget like this:Awesome, thank you.
For reference for anyone else who needs something like this, I had to update the conditional like so: