[]
        
(Showing Draft Content)

GC.Spread.Sheets.Designer.AtomicComponentBase

Class: AtomicComponentBase<ValueType, OptionsType>

Sheets.Designer.AtomicComponentBase

Type parameters

Name
ValueType
OptionsType

Table of contents

Constructors

Methods

Constructors

constructor

new AtomicComponentBase<ValueType, OptionsType>(host, options)

Represent a abstract class define atomical component.

Type parameters

Name
ValueType
OptionsType

Parameters

Name Type Description
host HTMLElement This is the HTML area that the Component mounts.
options OptionsType The component options.

Methods

getTemplate

getTemplate(options): string

set inner html here. will invoke when mount host to DOM.

Parameters

Name Type
options OptionsType

Returns

string


onDestroy

onDestroy(host): void

invoke when component will destroy.

Parameters

Name Type
host HTMLElement

Returns

void


onEnableChanged

onEnableChanged(prevEnable, nextEnable, host, options): void

Invoke this function when value status changed.

Parameters

Name Type
prevEnable boolean
nextEnable boolean
host HTMLElement
options OptionsType

Returns

void


onInit

onInit(options): void

invoke when component is initializing itself.

Parameters

Name Type
options OptionsType

Returns

void


onMounted

onMounted(host, options): void

invoke when component's host is append to DOM tree.

Parameters

Name Type
host HTMLElement
options OptionsType

Returns

void


onValueChanged

onValueChanged(prevValue, nextValue, host, options): void

Invoke this function when enable status changed.

Parameters

Name Type
prevValue ValueType
nextValue ValueType
host HTMLElement
options OptionsType

Returns

void


raiseValueChanged

raiseValueChanged(): void

raise the value changed event to Designer, which will call the execute function of command.

Returns

void


updateValue

updateValue(host, options): ValueType

get the latest component value. Invoked when framework needs component value.

Parameters

Name Type
host HTMLElement
options OptionsType

Returns

ValueType