Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import BasicDropdown from 'ember-basic-dropdown/components/basic-dropdown';
import layout from 'ember-basic-dropdown/templates/components/basic-dropdown';
import {inject as service} from '@ember/service';
export default BasicDropdown.extend({
dropdown: service(),
layout,
didInsertElement() {
this._super(...arguments);
this.dropdown.on('close', this, this.close);
},
willDestroyElement() {
this._super(...arguments);
this.dropdown.off('close', this, this.close);
}
});
import Ember from 'ember';
import BasicDropdown from 'ember-basic-dropdown/components/basic-dropdown';
const { $ } = Ember;
export default BasicDropdown.extend({
triggerComponent: 'paper-autocomplete-trigger-container',
reposition() {
if (!this.publicAPI.isOpen) {
return;
}
let dropdownElement = $(`.${this.dropdownId}`).get(0);
let triggerElement = document.getElementById(this.triggerId);
if (!dropdownElement || !triggerElement) {
return;
}
let renderInPlace = this.get('renderInPlace');
if (renderInPlace) {