Interface: NavDataNumberUnitFieldProps<T>
Component props for NavDataNumberUnitField.
Type parameters
Name | Type |
---|---|
T | extends NumberUnitInterface <string > |
Hierarchy
↳
NavDataNumberUnitFieldProps
Properties
children
• Optional
children: DisplayChildren
[]
The children of the display component.
Inherited from
Defined in
src/sdk/components/FSComponent.ts:122
class
• Optional
class: string
CSS class(es) to apply to the root of the component.
Inherited from
Defined in
src/garminsdk/components/navdatafield/NavDataField.tsx:22
displayUnit
• displayUnit: null
| Unit
<FamilyOfUnit
<UnitOfNumber
<T
>>> | Subscribable
<null
| Unit
<FamilyOfUnit
<UnitOfNumber
<T
>>>>
A subscribable which provides the display unit type.
Defined in
src/garminsdk/components/navdatafield/NavDataField.tsx:89
formatter
• formatter: (number
: number
) => string
A function which formats numbers.
Type declaration
▸ (number
): string
A function which formats numbers.
Parameters
Name | Type |
---|---|
number | number |
Returns
string
Defined in
src/garminsdk/components/navdatafield/NavDataField.tsx:92
hideUnitWhenNaN
• Optional
hideUnitWhenNaN: boolean
Whether to hide the unit text when the displayed value is equal to NaN
. Defaults to false
.
Defined in
src/garminsdk/components/navdatafield/NavDataField.tsx:103
model
• model: NavDataFieldModel
<T
>
The model data field's data model.
Inherited from
Defined in
src/garminsdk/components/navdatafield/NavDataField.tsx:19
ref
• Optional
ref: NodeReference
<any
>
A reference to the display component.
Inherited from
Defined in
src/sdk/components/FSComponent.ts:125
title
• title: string
The title of the data field.
Inherited from
Defined in
src/garminsdk/components/navdatafield/NavDataField.tsx:16
unitFormatter
• Optional
unitFormatter: (out
: [string
, string
], unit
: Unit
<FamilyOfUnit
<UnitOfNumber
<T
>>>, number
: number
) => void
A function which formats units. The formatted unit text should be written to the 2-tuple passed to the out
parameter, as [bigText, smallText]
. bigText
and smallText
will be rendered into separate <span>
elements
representing the big and small components of the rendered unit text, respectively. If not defined, then units
will be formatted based on the text generated by the UnitFormatter
class.
Type declaration
▸ (out
, unit
, number
): void
A function which formats units. The formatted unit text should be written to the 2-tuple passed to the out
parameter, as [bigText, smallText]
. bigText
and smallText
will be rendered into separate <span>
elements
representing the big and small components of the rendered unit text, respectively. If not defined, then units
will be formatted based on the text generated by the UnitFormatter
class.
Parameters
Name | Type |
---|---|
out | [string , string ] |
unit | Unit <FamilyOfUnit <UnitOfNumber <T >>> |
number | number |
Returns
void
Defined in
src/garminsdk/components/navdatafield/NavDataField.tsx:100