ember-basic-dropdown
Advanced tools
Comparing version 0.9.5-beta.15 to 0.10.0
@@ -160,13 +160,23 @@ /*jshint unused:false*/ | ||
if (this.get('disabled') || this.get('publicAPI.isOpen')) { return; } | ||
let onOpen = this.get('onOpen'); | ||
if (onOpen) { | ||
let returnValue = onOpen(this.get('publicAPI'), e); | ||
if (returnValue === false || (e && e.defaultPrevented)) { | ||
return; | ||
} | ||
} | ||
this.set('publicAPI.isOpen', true); | ||
let onOpen = this.get('onOpen'); | ||
if (onOpen) { onOpen(this.get('publicAPI'), e); } | ||
}, | ||
close(event, skipFocus) { | ||
close(e, skipFocus) { | ||
if (!this.get('publicAPI.isOpen')) { return; } | ||
let onClose = this.get('onClose'); | ||
if (onClose) { | ||
let returnValue = onClose(this.get('publicAPI'), e); | ||
if (returnValue === false || (e && e.defaultPrevented)) { | ||
return; | ||
} | ||
} | ||
this.set('publicAPI.isOpen', false); | ||
this.setProperties({ _verticalPositionClass: null, _horizontalPositionClass: null }); | ||
let onClose = this.get('onClose'); | ||
if (onClose) { onClose(this.get('publicAPI'), event); } | ||
if (skipFocus) { return; } | ||
@@ -173,0 +183,0 @@ const trigger = this.element.querySelector('.ember-basic-dropdown-trigger'); |
{ | ||
"name": "ember-basic-dropdown", | ||
"version": "0.9.5-beta.15", | ||
"version": "0.10.0", | ||
"description": "The default blueprint for ember-cli addons.", | ||
@@ -5,0 +5,0 @@ "directories": { |
2847926
59668