Skip to content

Commit

Permalink
Fixes #2583 issue with menu disappearing using allowAdditions: true
Browse files Browse the repository at this point in the history
  • Loading branch information
jlukic committed Aug 17, 2015
1 parent 7ded1ac commit 015a6fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
- **Container** - Fix issue with `fluid container` being `100% + gutter` at mobile resolution (causing overflow)
- **Dropdown** - `forceSelection` no longer sets current value in search selection when current query is blank #2058
- **Dropdown** - Dropdown `@arrowSize` will now automatically reposition itself if size is changed with variable
- **Dropdown** - Fixed error where menu would disappear when entering spaced words using `allowAdditions: true` caused by value matching its own whitespace-trimed value #2853
- **Dropdown** - Dropdown arrow now has a variable `@dropdownArrowSize`, and is slightly smaller than previously
- **Dropdown** - Fix `left menu` inside `ui menu` appearing horizontally #2778
- **Dropdown** - Fixed issue where "no results" message would be still be visible before search query on input focus #2824
Expand Down
5 changes: 3 additions & 2 deletions src/definitions/modules/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,6 @@ $.fn.dropdown = function(parameters) {
})
;
}

module.debug('Showing only matched items', searchTerm);
module.remove.filteredItem();
$item
Expand Down Expand Up @@ -2364,13 +2363,15 @@ $.fn.dropdown = function(parameters) {
userSuggestion: function(value) {
var
$addition = $menu.children(selector.addition),
alreadyHasValue = module.get.item(value),
$existingItem = module.get.item(value),
alreadyHasValue = $existingItem && $existingItem.not(selector.addition).length,
hasUserSuggestion = $addition.length > 0,
html
;
if(settings.useLabels && module.has.maxSelections()) {
return;
}
console.log(alreadyHasValue);
if(value === '' || alreadyHasValue) {
$addition.remove();
return;
Expand Down

0 comments on commit 015a6fc

Please sign in to comment.