ember-mobile-inputs
Advanced tools
Comparing version 3.3.4 to 3.3.5
@@ -168,3 +168,3 @@ import layout from "../templates/components/mi-number"; | ||
if (isNaN(value) && isPresent(min)){ | ||
if (isNaN(value) && isPresent(min)) { | ||
return min; | ||
@@ -192,8 +192,10 @@ } | ||
mobileInputVisibleChangedFn(value) { | ||
this.set('mobileInputVisible', value); | ||
}, | ||
didInsertElement: function() { | ||
this._super(...arguments); | ||
this.get('mobileInputEventBus').subscribe('mobileInputVisibleChanged', (value) => { | ||
this.set('mobileInputVisible', value); | ||
}); | ||
this.get('mobileInputEventBus').subscribe('mobileInputVisibleChanged', this.mobileInputVisibleChangedFn); | ||
@@ -213,5 +215,5 @@ if (!isTouchDevice()) { | ||
willDestroyElement(){ | ||
willDestroyElement() { | ||
this._super(...arguments); | ||
this.get('mobileInputEventBus').unsubscribe('mobileInputVisibleChanged'); | ||
this.get('mobileInputEventBus').unsubscribe('mobileInputVisibleChanged', this.mobileInputVisibleChangedFn); | ||
}, | ||
@@ -218,0 +220,0 @@ |
@@ -11,5 +11,8 @@ import Service from '@ember/service'; | ||
}, | ||
unsubscribe: function () { | ||
unsubscribe: function (eventName) { | ||
if (!this.has(eventName)){ | ||
return; | ||
} | ||
return this.off.apply(this, arguments); | ||
} | ||
}); |
{ | ||
"name": "ember-mobile-inputs", | ||
"version": "3.3.4", | ||
"version": "3.3.5", | ||
"description": "Mobile- and Desktop- friendly inputs", | ||
@@ -5,0 +5,0 @@ "scripts": { |
341916
926