Change helper function getValueWidgetById() to the more useful getInputWidgetById()

This commit is contained in:
nathangray 2020-05-25 11:02:12 -06:00
parent c6d7cb2467
commit bdbf28cd2c
3 changed files with 6 additions and 4 deletions

View File

@ -317,7 +317,7 @@ var et2_container = /** @class */ (function (_super) {
*
* @param _id is the id you're searching for
*/
et2_container.prototype.getValueWidgetById = function (_id) {
et2_container.prototype.getInputWidgetById = function (_id) {
var widget = this.getWidgetById(_id);
if (widget && widget.instanceOf(et2_valueWidget)) {
return widget;

View File

@ -387,12 +387,12 @@ export class et2_container extends et2_baseWidget
*
* @param _id is the id you're searching for
*/
getValueWidgetById(_id) : et2_valueWidget | null
getInputWidgetById(_id) : et2_inputWidget | null
{
let widget = this.getWidgetById(_id);
if(widget && widget.instanceOf(et2_valueWidget))
{
return <et2_valueWidget>widget;
return <et2_inputWidget><unknown>widget;
}
return null
}

View File

@ -7,7 +7,9 @@ declare class et2_widget{
destroy()
getWidgetById(string) : et2_widget;
}
declare class et2_DOMWidget extends et2_widget{}
declare class et2_DOMWidget extends et2_widget{
public set_class(value: string);
}
declare class et2_baseWidget extends et2_DOMWidget{}
declare class et2_valueWidget extends et2_baseWidget{}
declare class et2_inputWidget extends et2_valueWidget{