Browse Source

Fixes #2583 issue with menu disappearing using allowAdditions: true

pull/2869/head
Jack Lukic 9 years ago
parent
commit
015a6fc70a
2 changed files with 4 additions and 2 deletions
  1. 1
      RELEASE-NOTES.md
  2. 5
      src/definitions/modules/dropdown.js

1
RELEASE-NOTES.md

@ -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

5
src/definitions/modules/dropdown.js

@ -724,7 +724,6 @@ $.fn.dropdown = function(parameters) {
})
;
}
module.debug('Showing only matched items', searchTerm);
module.remove.filteredItem();
$item
@ -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;

Loading…
Cancel
Save