Updated Min/Max value labels (#813)

Min/Max values fields will now check if a title was passed. If no title was passed the label will be "Minimum" or "Maximum".
This commit is contained in:
Kayvon-Martinez 2023-12-18 15:30:29 +00:00 committed by GitHub
parent d6be107167
commit 4cb2fa66aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -118,7 +118,7 @@ export default function NumericRangeField({
<div className="numeric--range-field-inputs"> <div className="numeric--range-field-inputs">
<TextInput <TextInput
id={`${id}-min`} id={`${id}-min`}
labelText={`Minimum ${schema.title || ''}`} labelText={(schema as any).properties?.min?.title || `Minimum`}
disabled={disabled} disabled={disabled}
readonly={readonly} readonly={readonly}
value={formatNumberString(min)} value={formatNumberString(min)}
@ -131,7 +131,7 @@ export default function NumericRangeField({
/> />
<TextInput <TextInput
id={`${id}-max`} id={`${id}-max`}
labelText={`Maximum ${schema.title || ''}`} labelText={(schema as any).properties?.max?.title || `Maximum`}
disabled={disabled} disabled={disabled}
readonly={readonly} readonly={readonly}
value={formatNumberString(max)} value={formatNumberString(max)}