How to use the ember-basic-dropdown/components/basic-dropdown.extend function in ember-basic-dropdown

To help you get started, we’ve selected a few ember-basic-dropdown examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TryGhost / Ghost-Admin / app / components / gh-basic-dropdown.js View on Github external
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);
    }
});
github miguelcobain / ember-paper / addon / components / paper-autocomplete-dropdown.js View on Github external
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) {