LabelGroup
Extends:
A label group is an input along with surrounding metadata. This means this manages validation, interaction, labels, and more. This also allows you to configure tooltips.
The label group can mount any item that implements the InputInterface interface.
Constructor Summary
Public Constructor | ||
public |
constructor(label: string, input: InputInterface, o: Object) A group of label and the input. |
Member Summary
Public Members | ||
public |
|
|
public |
|
|
public get |
value: any Sets the value of the underlying input value if applicable. |
|
public set |
value(newValue: any) Sets the value of the type. |
|
public set |
Sets the weight in a group |
Method Summary
Public Methods | ||
public |
foreignSynchronize(interactor: ForeignInteractor, key: string, time: number) Foreign synchronizes |
|
public |
observeValidation(): Observable Observe the validation status. |
|
public |
observeValue(): Observable Returns observer for the value. |
|
public |
async setTooltip(tooltip: string) Sets the tooltip text |
|
public |
validate(errors: ValidationError[]) Validates the LabelGroup for live labels |
Public Constructors
public constructor(label: string, input: InputInterface, o: Object) source
A group of label and the input.
If you do supply a template. Ensure it has .input
attribute which
evaluates to the underling HTMLInputElement which can be observed for
value updates. See InputInterface
Params:
Name | Type | Attribute | Description |
label | string | The label (self-explantory) |
|
input | InputInterface | The input to mount |
|
o | Object | additional options. |
|
o.tooltip | string |
|
Some info describing what this does. Do note if you select the horizontal style. This will appear as an inline description. |
o.isHorizontalStyle | boolean |
|
Uses 'horizontal' style. Places title and description on the side. used for things such as checkbox. |
o.button | ButtonTemplate |
|
Pass if you want to keep a button within label group for alignment purposes |
o.liveConstraint | FormConstraint |
|
Contraints already setup to show |
o.interactor | ForeignInteractor |
|
Foreign interactor to link |
o.hideLabel | boolean |
|
If label should be hidden. |
o.weight | number |
|
If in group how much weight (default is one) |
Public Members
public input: TextInputTemplate source
public validationDelegate: ActionControllerDelegate source
public get value: any source
Sets the value of the underlying input value if applicable. Gives no guarantee of the sync with UI.
public set value(newValue: any) source
Sets the value of the type. USE of this setter is NOT reccomended.
Public Methods
public foreignSynchronize(interactor: ForeignInteractor, key: string, time: number) source
Foreign synchronizes
Params:
Name | Type | Attribute | Description |
interactor | ForeignInteractor | ||
key | string | ||
time | number | delay in the queue see repsective interactor fn |
public observeValidation(): Observable source
Observe the validation status. This provides list of errors
Return:
Observable |
public async setTooltip(tooltip: string) source
Sets the tooltip text
Params:
Name | Type | Attribute | Description |
tooltip | string |
public validate(errors: ValidationError[]) source
Validates the LabelGroup for live labels
Params:
Name | Type | Attribute | Description |
errors | ValidationError[] |