Skip to content

Commit

Permalink
Merge pull request #34 from unicef-polymer/fix/field-visibility
Browse files Browse the repository at this point in the history
Fix/field visibility
  • Loading branch information
adi130987 authored Jan 9, 2017
2 parents 2d97506 + f1ec96e commit 60039ff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "etools-searchable-multiselection-menu",
"description": "Dropdown menu with search and multiple options selection",
"version": "1.0.12",
"version": "1.0.13",
"license": "https://github.com/unicef-polymer/etools-searchable-multiselection-menu/blob/master/LICENSE.md",
"main": "etools-searchable-multiselection-menu.html",
"dependencies": {
Expand Down
20 changes: 9 additions & 11 deletions etools-searchable-multiselection-menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,6 @@
position: relative;
}

.dropdown-opened .value-container,
.dropdown-opened .multi-container {
visibility: hidden;
}


#dropdownMenu {
position: absolute;
right: 0;
Expand Down Expand Up @@ -227,7 +221,7 @@
dynamic-align$="[[dynamicAlign]]"
disabled="[[disabled]]">

<paper-icon-button icon="arrow-drop-down" class="dropdown-trigger "></paper-icon-button>
<paper-icon-button icon="arrow-drop-down" class="dropdown-trigger"></paper-icon-button>

<div class="dropdown-content">

Expand Down Expand Up @@ -446,10 +440,14 @@
},

_openMenu: function() {
if (this.value && this.value instanceof Array && this.value.length > 0) {
return;
}
this.set('menuOpened', true);
this.debounce('openDropdown', function () {
if (this.value && this.value instanceof Array && this.value.length > 0) {
return;
}
if (!this.menuOpened) {
this.set('menuOpened', true);
}
}.bind(this), 100);
},

_onDropdownOpen: function() {
Expand Down

0 comments on commit 60039ff

Please sign in to comment.