Class: GenericNavDataFieldRenderer
A generic implementation of a navigation data field renderer. For each data field type, a single-type renderer can be registered. Once registered, the single-type renderer is used to create render data fields for its assigned data field type.
Implements
Constructors
constructor
• new GenericNavDataFieldRenderer(): GenericNavDataFieldRenderer
Returns
Methods
deregister
▸ deregister<T
>(type
): boolean
Deregisters a single-type renderer.
Type parameters
Name | Type |
---|---|
T | extends NavDataFieldType |
Parameters
Name | Type | Description |
---|---|---|
type | T | The data field type of the single-type renderer to deregister. |
Returns
boolean
Whether a single-type renderer was deregistered.
Defined in
src/garminsdk/components/navdatafield/GenericNavDataFieldRenderer.tsx:27
register
▸ register<T
>(type
, renderer
): void
Registers a single-type renderer.
Type parameters
Name | Type |
---|---|
T | extends NavDataFieldType |
Parameters
Name | Type | Description |
---|---|---|
type | T | The data field type of the single-type renderer to register. |
renderer | NavDataFieldTypeRenderer <T > | The single-type renderer to register. |
Returns
void
Defined in
src/garminsdk/components/navdatafield/GenericNavDataFieldRenderer.tsx:18
render
▸ render<T
>(type
, model
): VNode
Renders a navigation data field of a given type.
Type parameters
Name | Type |
---|---|
T | extends NavDataFieldType |
Parameters
Name | Type | Description |
---|---|---|
type | T | A navigation data field type. |
model | NavDataFieldTypeModelMap [T ] | The data model for the field. |
Returns
VNode
A navigation data field of the given type, as a VNode.
Throws
Error if an unsupported field type is specified.
Implementation of
Defined in
src/garminsdk/components/navdatafield/GenericNavDataFieldRenderer.tsx:32