Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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) {