Skip to main content

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

GenericNavDataFieldRenderer

Methods

deregister

deregister<T>(type): boolean

Deregisters a single-type renderer.

Type parameters

NameType
Textends NavDataFieldType

Parameters

NameTypeDescription
typeTThe 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

NameType
Textends NavDataFieldType

Parameters

NameTypeDescription
typeTThe data field type of the single-type renderer to register.
rendererNavDataFieldTypeRenderer<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

NameType
Textends NavDataFieldType

Parameters

NameTypeDescription
typeTA navigation data field type.
modelNavDataFieldTypeModelMap[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

NavDataFieldRenderer.render

Defined in

src/garminsdk/components/navdatafield/GenericNavDataFieldRenderer.tsx:32