How to use the atom-select-list.prototype function in atom-select-list

To help you get started, we’ve selected a few atom-select-list 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 faceair / atom-goto-definition / lib / definitions-view.js View on Github external
import etch from 'etch';

function DefinitionsListView(props) {
  this.props = props;
  this.computeItems(false);
  this.disposables = new CompositeDisposable();
  etch.initialize(this);
  this.element.classList.add('select-list');
  this.disposables.add(this.refs.queryEditor.onDidChange(this.didChangeQuery.bind(this)));
  if (!props.skipCommandsRegistration) {
    this.disposables.add(this.registerAtomCommands());
  }
  this.disposables.add(new Disposable(() => { this.unbindBlur(); }));
}

DefinitionsListView.prototype = SelectListView.prototype;

DefinitionsListView.prototype.bindBlur = function bindBlur() {
  const editorElement = this.refs.queryEditor.element;
  const didLoseFocus = this.didLoseFocus.bind(this);
  editorElement.addEventListener('blur', didLoseFocus);
};

DefinitionsListView.prototype.unbindBlur = function unbindBlur() {
  const editorElement = this.refs.queryEditor.element;
  const didLoseFocus = this.didLoseFocus.bind(this);
  editorElement.removeEventListener('blur', didLoseFocus);
};


export default class DefinitionsView {
  constructor(emptyMessage = 'No definition found', maxResults = null) {

atom-select-list

A general-purpose select list for use in Atom packages

MIT
Latest version published 3 years ago

Package Health Score

48 / 100
Full package analysis

Similar packages