fixing the fix, missed the camelCase of Et2Checkbox and changed Et2Checkbox so IDE can check it

This commit is contained in:
ralf
2024-07-06 09:06:58 +02:00
parent 2fa7fa9a45
commit a893669641
3 changed files with 13 additions and 24 deletions

View File

@@ -14,6 +14,7 @@ import {Et2InputWidget} from "../Et2InputWidget/Et2InputWidget";
import '../Et2Image/Et2Image';
import {SlCheckbox} from "@shoelace-style/shoelace";
import shoelace from "../Styles/shoelace";
import {property} from "lit/decorators/property.js";
export class Et2Checkbox extends Et2InputWidget(SlCheckbox)
{
@@ -59,31 +60,21 @@ export class Et2Checkbox extends Et2InputWidget(SlCheckbox)
];
}
static get properties()
{
return {
...super.properties,
/* Different value when checked */
selectedValue: {type: String},
/* Different value when unchecked */
unselectedValue: {type: String}
}
}
@property({type: String})
selectedValue = 'true';
@property({type: String})
unselectedValue = '';
constructor()
{
super();
this.isSlComponent = true;
this.selectedValue = 'true';
this.unselectedValue = '';
}
connectedCallback()
{
super.connectedCallback();
}
get label()

View File

@@ -22,7 +22,7 @@ import {egw, IegwAppLocal} from "../jsapi/egw_global";
import {et2_cloneObject, et2_csvSplit} from "./et2_core_common";
import {et2_compileLegacyJS} from "./et2_core_legacyJSFunctions";
import {et2_IDOMNode, et2_IInputNode} from "./et2_core_interfaces";
import {loadWebComponent} from "./Et2Widget/Et2Widget";
import {loadWebComponent,Et2Widget} from "./Et2Widget/Et2Widget";
// fixing circular dependencies by only importing type
import type {et2_container} from "./et2_core_baseWidget";
import type {et2_inputWidget} from "./et2_core_inputWidget";
@@ -460,7 +460,7 @@ export class et2_widget extends ClassWithAttributes
*
* @param _id is the id you're searching for
*/
getWidgetById(_id): et2_widget | null
getWidgetById(_id): Et2Widget | et2_widget | null
{
if (this.id == _id)
{
@@ -480,7 +480,7 @@ export class et2_widget extends ClassWithAttributes
if (this.id && _id.indexOf('[') > -1 && this._children.length)
{
var ids = (new et2_arrayMgr()).explodeKey(_id);
var widget: et2_widget = this;
var widget: Et2Widget | et2_widget = this;
for (var i = 0; i < ids.length && widget !== null; i++)
{
widget = widget.getWidgetById(ids[i]);