Skip to content

Commit

Permalink
Merge pull request #46 from unicef-polymer/develop
Browse files Browse the repository at this point in the history
single selection fix for: selected value becomes null if dropdown is closed without selecting  any option
  • Loading branch information
adi130987 authored Feb 11, 2017
2 parents 5e6d3bf + c052bd3 commit 2b40387
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 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.22",
"version": "1.0.23",
"license": "https://github.com/unicef-polymer/etools-searchable-multiselection-menu/blob/master/LICENSE.md",
"main": "etools-searchable-multiselection-menu.html",
"dependencies": {
Expand Down
6 changes: 5 additions & 1 deletion etools-searchable-multiselection-menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,11 @@
* value and selectedValues must be updated with that object data
*/
this.set('value', value[0]);
this.set('selectedValues', [value[0][this.optionValue]]);
this.set('selectedValues', value[0][this.optionValue]);
} else if (!this.multi && !Array.isArray(value) &&
typeof value === 'object' && value[this.optionValue]) {
// single selection, value is just an object from options
this.set('selectedValues', value[this.optionValue]);
}
},
// get esmm single selection selected label to be displayed
Expand Down

0 comments on commit 2b40387

Please sign in to comment.