[Feature Request][Dropdown] Clean Selection ...
See original GitHub issueFeature Request
Description
how i can implements this feature by set a setting ?
Example
<div class="ui search selection dropdown">
<i class="dropdown icon"></i>
<input name="language" type="hidden" class="" value="fa_IR">
<input class="search" autocomplete="off" tabindex="0">
<div class="default text"></div>
<div class="menu " tabindex="-1">
<div class="item" data-value="fa_IR">فارسی (ایران)</div>
</div>
</div>
$('.ui.dropdown').dropdown({
forceSelection : false,
fullTextSearch : true,
onHide : function(){ //feature is here
$(this).dropdown('set selected',$(this).dropdown('get value')).find('>input.search').val('');
},
});
Testcase
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Dropdown reset/clear selection(TWX 9.1) - PTC Community
I have 2 dropdowns, I want to reset/clear selection for first dropdown when the selected row is changed in second dropdown. How to...
Read more >[Feature Request] Clear select component programmatically
Description. If I'm not mistaken, there is no way to clear, or reset el-select component to its placeholder from within parent component.
Read more >Clear the dropdown list - Feature Requests - Redash Discourse
Example: I have the dropdown list with 20 values, by default - all values are selected, but I want choice only one values....
Read more >How do I clear all options in a dropdown box? - Stack Overflow
To remove the options of an HTML element of select , you can utilize the remove() method: function removeOptions(selectElement) { var i, ...
Read more >Reset Dropdown selection | Velo by Wix
How can i reset the dropdown selections? can i clear the dropdowns items? ... You can vote, comment, and track the status of...
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
@ziaratban After thinking about it for a while now, i think we can make use of the already existing
allowAdditions
setting. This isfalse
by default and should remove the searchterm when it does not match anything. I prepared a PR to support that here https://github.com/fomantic/Fomantic-UI/pull/1002I am still not understanding your use case.
'forceSelection:true
of course selects anything matching while typing, that’s the intention of it. The code you are providing always removes the search term when hiding the menu. That is not the intention offorceSelection:false
. It’s meant to be able to select something which is not in the list. I am not sure if we really should add an option to always remove the searchterm on hide if nothing is found… Let’s see what others say