How to use the ember-basic-dropdown/components/basic-dropdown-trigger.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 cibernox / ember-basic-dropdown / tests / dummy / app / components / trigger-with-did-receive-attrs.js View on Github external
import Trigger from 'ember-basic-dropdown/components/basic-dropdown-trigger';

export default Trigger.extend({
  didOpen: false,

  didReceiveAttrs() {
    let { dropdown, oldDropdown = {} } = this;
    if ((oldDropdown && oldDropdown.isOpen) === false && dropdown.isOpen) {
      this.set('didOpen', true);
    }
    this.set('oldDropdown', dropdown);
  }
});