mirror of
https://github.com/Choices-js/Choices.git
synced 2024-05-23 07:52:22 +02:00
45 lines
817 B
JavaScript
45 lines
817 B
JavaScript
import WrappedElement from './wrapped-element';
|
|
|
|
export default class WrappedSelect extends WrappedElement {
|
|
constructor(instance, element, classNames) {
|
|
super(instance, element, classNames);
|
|
this.parentInstance = instance;
|
|
this.element = element;
|
|
this.classNames = classNames;
|
|
}
|
|
|
|
conceal() {
|
|
super.conceal();
|
|
}
|
|
|
|
reveal() {
|
|
super.reveal();
|
|
}
|
|
|
|
enable() {
|
|
super.enable();
|
|
}
|
|
|
|
disable() {
|
|
super.enable();
|
|
}
|
|
|
|
setOptions(options) {
|
|
this.element.innerHTML = '';
|
|
this.element.appendChild(options);
|
|
}
|
|
|
|
getPlaceholderOption() {
|
|
return this.element.querySelector('option[placeholder]');
|
|
}
|
|
|
|
getOptions() {
|
|
return Array.from(this.element.options);
|
|
}
|
|
|
|
getOptionGroups() {
|
|
return Array.from(this.element.getElementsByTagName('OPTGROUP'));
|
|
}
|
|
|
|
}
|