Skip to content

Commit

Permalink
readonly observer to update styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Hangan committed Feb 16, 2017
1 parent e45148f commit 73a5fab
Show file tree
Hide file tree
Showing 2 changed files with 9 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.25",
"version": "1.0.26",
"license": "https://github.com/unicef-polymer/etools-searchable-multiselection-menu/blob/master/LICENSE.md",
"main": "etools-searchable-multiselection-menu.html",
"dependencies": {
Expand Down
9 changes: 8 additions & 1 deletion etools-searchable-multiselection-menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,8 @@
readonly: {
type: Boolean,
value: function() { return false; },
reflectToAttribute: true
reflectToAttribute: true,
observer: '_readonlyStateChanged'
},
invalid: {
type: Boolean,
Expand Down Expand Up @@ -455,6 +456,12 @@
return disabled || readonly;
},

_readonlyStateChanged: function(readonly, oldReadonly) {
if (typeof oldReadonly !== 'undefined' && readonly !== oldReadonly) {
this.updateStyles();
}
},

_withoutSearchClass: function(hideSearch) {
if (hideSearch) {
return 'no-search';
Expand Down

0 comments on commit 73a5fab

Please sign in to comment.