import {AbsBaseSelect} from './base/AbsBaseSelect' import NoTreeData from './data/NoTreeData' export default class NoTreeSelect extends AbsBaseSelect{ constructor($container, {url, obj, visible=true, required = false}){ //TODO: сделать автоматическую передачу всех параметров родителю super($container, {url, obj, visible, required}); } _buildComponents(data) { super._buildComponents(data); this.dataTree = this.dataTree || new NoTreeData(data.results || data); this.$buttonAddOptions.hide(); this._fillOptionsData(); this._bindEvents(); } setElementById(id) { super.setElementById(id); this.selectedContainer.add(id); } _onclickOptionsElement(e) { super._onclickOptionsElement(e); this.clear(); e.preventDefault(); return false; } _onButtonAddOptions(e) { // pass } }