From c9a478c3d26214d4e5a37534afa49bd3c4baab3a Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 7 Apr 2021 16:28:21 +0200 Subject: [PATCH] change getRoot() to return et2_container to get (g|s)etValueById() and friends working without a cast --- api/js/etemplate/et2_core_widget.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/et2_core_widget.ts b/api/js/etemplate/et2_core_widget.ts index fb54193a65..fb8a03badd 100644 --- a/api/js/etemplate/et2_core_widget.ts +++ b/api/js/etemplate/et2_core_widget.ts @@ -18,6 +18,7 @@ import {ClassWithAttributes} from './et2_core_inheritance'; import {et2_arrayMgr, et2_readonlysArrayMgr} from "./et2_core_arrayMgr"; +import {et2_baseWidget, et2_container} from "./et2_core_baseWidget"; /** * The registry contains all XML tag names and the corresponding widget @@ -349,12 +350,12 @@ export class et2_widget extends ClassWithAttributes /** * Returns the base widget */ - getRoot() : et2_widget + getRoot() : et2_container { if (this._parent != null) { return this._parent.getRoot(); } else { - return this; + return this; } }