mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-11 17:20:53 +01:00
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);
|