Interface: IProblemsService
molecule.IProblemsService
Hierarchy
Implemented by
Properties
state
• Protected
Abstract
state: IProblems
<any
>
Inherited from
Defined in
Methods
add
▸ add(data
): void
Add single or multiple items data
Parameters
Name | Type |
---|---|
data | IProblemsItem <any > | IProblemsItem <any >[] |
Returns
void
Defined in
services/problemsService.ts:28
count
▸ count(name
): number
Count the service event
Parameters
Name | Type | Description |
---|---|---|
name | string | Event name |
Returns
number
Inherited from
Defined in
emit
▸ emit(name
, ...args
): void
Emit the service event
Parameters
Name | Type | Description |
---|---|---|
name | string | Event name |
...args | any | Arguments |
Returns
void
Inherited from
Defined in
forceUpdate
▸ forceUpdate(): void
Force to update the Component
Returns
void
Inherited from
Defined in
getState
▸ getState(): IProblems
<any
>
Get the Component state
Returns
IProblems
<any
>
Inherited from
Defined in
onSelect
▸ onSelect(callback
): void
Listen to select a problem tree node
Parameters
Name | Type |
---|---|
callback | (node : IProblemsTreeNode <any >) => void |
Returns
void
Defined in
services/problemsService.ts:51
onUpdateState
▸ onUpdateState(listener
): void
Listen to the Component state update event
Parameters
Name | Type |
---|---|
listener | (prevState : IProblems <any >, nextState : IProblems <any >) => void |
Returns
void
Inherited from
Defined in
remove
▸ remove(id
): void
Remove the specific problem items
Parameters
Name | Type | Description |
---|---|---|
id | UniqueId | UniqueId [] | single or multiple ids |
Returns
void
Defined in
services/problemsService.ts:33
removeOnUpdateState
▸ removeOnUpdateState(listener?
): void
Remove the Component update event listening, default is remove all, also you can remove one by pass the listener
Parameters
Name | Type |
---|---|
listener? | Function |
Returns
void
Inherited from
Defined in
render
▸ render(nextState?
): void
Initiative notify the component to render the view by the state
Parameters
Name | Type |
---|---|
nextState? | IProblems <any > |
Returns
void
Inherited from
Defined in
reset
▸ reset(): void
Reset the ProblemsService state data
Returns
void
Defined in
services/problemsService.ts:37
setState
▸ setState(values
, callback?
): void
Set the state values, and notify the view component to re render
Parameters
Name | Type | Description |
---|---|---|
values | Partial <IProblems <any >> | update target state values |
callback? | (prevState : IProblems <any >, nextState : IProblems <any >) => void | - |
Returns
void
Inherited from
Defined in
subscribe
▸ subscribe(name
, listener
): void
Subscribe the service event
Parameters
Name | Type | Description |
---|---|---|
name | string | string [] | Event name |
listener | Function | Listener function |
Returns
void
Inherited from
Defined in
toggleProblems
▸ toggleProblems(): void
Toggle the Problems view between display or hidden
Returns
void
Defined in
services/problemsService.ts:46
unsubscribe
▸ unsubscribe(name
, listener?
): void
Unsubscribe the specific event and the listener function
Parameters
Name | Type | Description |
---|---|---|
name | any | The event name |
listener? | Function | optional, it unsubscribes events via name if not pass the listener function |
Returns
void
Inherited from
Defined in
update
▸ update<T
>(data
): void
Update the specific data
Type parameters
Name |
---|
T |
Parameters
Name | Type | Description |
---|---|---|
data | IProblemsItem <T > | IProblemsItem <T >[] | single or multiple problems |
Returns
void