How to use the ember-power-select/components/power-select/before-options.extend function in ember-power-select

To help you get started, we’ve selected a few ember-power-select 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 code-corps / code-corps-ember / app / components / power-select / before-task-options.js View on Github external
import { get, set } from '@ember/object';
import { on } from '@ember/object/evented';
import BeforeOptionsComponent from 'ember-power-select/components/power-select/before-options';
import {
  EKMixin as EmberKeyboardMixin,
  keyDown
} from 'ember-keyboard';

export default BeforeOptionsComponent.extend(EmberKeyboardMixin, {
  init() {
    this._super(...arguments);

    set(this, 'keyboardActivated', true);
  },

  keydown: on(keyDown(), function(event, ekEvent) {
    ekEvent.stopPropagation();
    ekEvent.stopImmediatePropagation();
    // Send the action ember-power-select expects
    this.sendAction('onKeydown', event);
  }),

  actions: {
    close() {
      get(this, 'selectRemoteController').actions.close();
github miguelcobain / ember-paper / addon / components / paper-select-search.js View on Github external
import PowerBeforeOptions from 'ember-power-select/components/power-select/before-options';
import layout from '../templates/components/paper-select-search';

export default PowerBeforeOptions.extend({
  layout
});