@serenity-is/corelib / Widget
Toolbar
BaseDialog
BasePanel
EditorWidget
PropertyGrid
QuickFilterBar
QuickSearchInput
FilterWidgetBase
SlickPager
DataGrid
• P = {}
new Widget<
P
>(props
):Widget
<P
>
WidgetProps
<P
>
Widget
<P
>
readonly
domNode:HTMLElement
readonly
idPrefix:string
protected
readonly
options:WidgetProps
<P
>
readonly
uniqueName:string
readonly
static
isComponent:true
=true
static
typeInfo:ClassTypeInfo
<"Serenity.Widget"
>
get element():
Fluent
<HTMLElement
>
Returns a Fluent(this.domNode) object
Fluent
<HTMLElement
>
get props():
WidgetProps
<P
>
WidgetProps
<P
>
protected
addCssClass():void
void
addValidationRule(
rule
,uniqueName
?):void
(input
) => string
string
void
addValidationRule(
uniqueName
,rule
):void
string
(input
) => string
void
protected
afterRender(callback
):void
() => void
void
protected
byId<TElement
>(id
):Fluent
<TElement
>
• TElement extends HTMLElement
= HTMLElement
string
Fluent
<TElement
>
change(
handler
):void
(e
) => void
void
changeSelect2(
handler
):void
(e
) => void
void
protected
deferRender():boolean
boolean
destroy():
void
void
protected
findById<TElement
>(id
):TElement
• TElement extends HTMLElement
= HTMLElement
string
TElement
protected
getCssClass():string
string
protected
getCustomAttribute<TAttr
>(attrType
,inherit
):TAttr
• TAttr
(...args
) => TAttr
boolean
= true
TAttr
getGridField():
Fluent
<HTMLElement
>
Fluent
<HTMLElement
>
init():
this
this
internalRenderContents():
void
void
protected
legacyTemplateRender():boolean
boolean
render():
any
Returns the main element for this widget or the document fragment. As widgets may get their elements from props unlike regular JSX widgets, this method should not be overridden. Override renderContents() instead.
any
protected
renderContents():any
any
protected
syncOrAsyncThen<T
>(syncMethod
,asyncMethod
,then
):void
• T
() => T
() => PromiseLike
<T
>
(v
) => void
void
protected
useIdPrefix():IdPrefixType
static
create<TWidget
,P
>(params
):TWidget
• TWidget extends Widget
<P
>
• P
CreateWidgetParams
<TWidget
, P
>
TWidget
static
createDefaultElement():HTMLElement
HTMLElement
static
getWidgetName(type
):string
Function
string