[Dropdown] Search dropdowns don't hide dividers
See original GitHub issueHere is a standard ui search selection dropdown
in Semantic UI v2.3:
Take note of the dividers (such as the one above “Other”.
Now observe what happens after entering pote
in search:
See how the two dividers are still there below “Potential Employee”? This gets pretty gnarly with larger lists.
I’d suggest hiding .ui.search.selection.dropdown > .menu > .divider
via javascript whenever search is triggered, and un-hiding them when it’s empty.
HTML:
<div class="field">
<label>Phone Type</label>
<div class="ui search selection dropdown">
<input type="hidden" name="type_id">
<i class="dropdown icon"></i>
<div class="default text">Phone Type</div>
<div class="menu">
<div class="item" data-value="1">Sales Lead</div>
<div class="item" data-value="2">Distributor</div>
<div class="item" data-value="3">Potential Distributor</div>
<div class="item" data-value="4">Postal</div>
<div class="item" data-value="5">Freight</div>
<div class="item" data-value="6">Maintenance</div>
<div class="item" data-value="7">Potential Employee</div>
<div class="divider"></div>
<div class="item" data-value="8">Family</div>
<div class="item" data-value="9">Friend</div>
<div class="item" data-value="10">Douchebag</div>
<div class="divider"></div>
<div class="item" data-value="1000">Other</div>
</div>
</div>
</div>
JS:
$('.ui.search.selection.dropdown').dropdown({
// true, false and 'exact' all have this issue
fullTextSearch: 'exact'
});
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Don't hide dropdown list when clicked inside it - Stack Overflow
I've made this dropdown menu using bootstrap. The problem is that it hides itself when I click inside it or check a checkbox...
Read more >Dropdown - Semantic UI
A selection dropdown can allow a user to search through a large list of choices. ... A dropdown menu can contain dividers to...
Read more >Excel - automatically hiding select rows based on drop down ...
Hi there! I have a drop down selection of 10 items on my dashboard tab and am trying to only show rows 57...
Read more >Bootstrap Dropdowns - examples & tutorial
Responsive dropdown/caret built with Bootstrap 5. Examples of navbar dropdown, dropdown list, submenu, dropdown toggle, dropdown hover, hamburger icon ...
Read more >Dropdowns · Bootstrap v5.0
Wrap the dropdown's toggle (your button or link) and the dropdown menu within .dropdown , or another element that declares position: relative; ....
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 Free
Top 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
Option
hideDividers
available in https://fomantic-ui.com/modules/dropdown.html#/settingsBump.