mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-29 11:23:54 +01:00
e323cd1d79
Update shoelace to 2.9.0
29 lines
555 B
TypeScript
29 lines
555 B
TypeScript
import {Et2Select} from "../Et2Select";
|
|
import {Et2StaticSelectMixin, StaticOptions} from "../StaticOptions";
|
|
|
|
export class Et2SelectBool extends Et2StaticSelectMixin(Et2Select)
|
|
{
|
|
constructor()
|
|
{
|
|
super();
|
|
|
|
this._static_options = StaticOptions.bool(this);
|
|
}
|
|
|
|
get value()
|
|
{
|
|
return super.value;
|
|
}
|
|
|
|
/**
|
|
* Boolean option values are "0" and "1", so change boolean to those
|
|
* @param {string | string[]} new_value
|
|
*/
|
|
set value(new_value)
|
|
{
|
|
super.value = new_value ? "1" : "0";
|
|
}
|
|
}
|
|
|
|
customElements.define("et2-select-bool", Et2SelectBool);
|