# Interface: Component
# Hierarchy
Component
# Table of contents
# Properties
# Methods
# Properties
# el
• el: HTMLElement
Compiled Component's element from passed domString parameter.
# wrapperEl
• wrapperEl: HTMLElement
Component's wrapper element.
# Methods
# disable
▸ disable(): void
# Returns
void
# enable
▸ enable(): void
# Returns
void
# getValue
▸ getValue(dataAttr): string
Gets the value of innerHtml from element which matched by @param dataAttr.
# Parameters
| Name | Type | Description |
|---|---|---|
dataAttr | string | the name of the data attribute to match the component's element. <div data-test-value>Test value</div> component.getValue("test-value") // returns "Test value" |
# Returns
string
# hide
▸ hide(): void
Hides the element from UI.
# Returns
void
# isVisible
▸ isVisible(): boolean
Returns true if component is visible, false otherwise.
# Returns
boolean
# onClick
▸ onClick(event?): void
On component click handler function
# Parameters
| Name | Type |
|---|---|
event? | Event |
# Returns
void
# setValue
▸ setValue(dataAttr, value): void
Replaces the value of innerHtml from element which matched by @param dataAttr.
# Parameters
| Name | Type | Description |
|---|---|---|
dataAttr | string | the name of the data attribute to match the component's element. <div data-test-value>Test value</div> component.setValue("test-value", "Replaced") // Will replace the text in div to "Replaced" text. |
value | any | - |
# Returns
void
# show
▸ show(): void
Shows the element on UI.
# Returns
void
# updateDom
▸ updateDom(domString): void
Updates components DOM with provided domString parameter.
# Parameters
| Name | Type |
|---|---|
domString | string |
# Returns
void