Skip to content

Commit

Permalink
fix(slo): number fields safari (#164496)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdelemme authored Aug 22, 2023
1 parent 9b489ed commit 1caac7d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,17 +241,17 @@ export function SloEditFormObjectiveSection() {
min: 0.001,
max: 99.999,
}}
render={({ field: { ref, ...field }, fieldState }) => (
render={({ field: { ref, onChange, ...field }, fieldState }) => (
<EuiFieldNumber
{...field}
required
isInvalid={fieldState.invalid}
data-test-subj="sloFormObjectiveTargetInput"
value={String(field.value)}
value={field.value}
min={0.001}
max={99.999}
step={0.001}
onChange={(event) => field.onChange(Number(event.target.value))}
onChange={(event) => onChange(event.target.value)}
/>
)}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ export function SloEditFormObjectiveSectionTimeslices() {
min: 0.001,
max: 99.999,
}}
render={({ field: { ref, ...field }, fieldState }) => (
render={({ field: { ref, onChange, ...field }, fieldState }) => (
<EuiFieldNumber
{...field}
required
isInvalid={fieldState.invalid}
value={String(field.value)}
value={field.value}
data-test-subj="sloFormObjectiveTimesliceTargetInput"
min={0.001}
max={99.999}
step={0.001}
onChange={(event) => field.onChange(Number(event.target.value))}
onChange={(event) => onChange(event.target.value)}
/>
)}
/>
Expand Down Expand Up @@ -82,17 +82,17 @@ export function SloEditFormObjectiveSectionTimeslices() {
defaultValue="1"
control={control}
rules={{ required: true, min: 1, max: 120 }}
render={({ field: { ref, ...field }, fieldState }) => (
render={({ field: { ref, onChange, ...field }, fieldState }) => (
<EuiFieldNumber
{...field}
isInvalid={fieldState.invalid}
required
data-test-subj="sloFormObjectiveTimesliceWindowInput"
value={String(field.value)}
value={field.value}
min={1}
max={120}
step={1}
onChange={(event) => field.onChange(String(Number(event.target.value)))}
onChange={(event) => onChange(String(parseInt(event.target.value, 10)))}
/>
)}
/>
Expand Down

0 comments on commit 1caac7d

Please sign in to comment.