mirror of
https://github.com/portainer/portainer.git
synced 2025-08-05 05:45:22 +02:00
fix(ui): parse slider value correctly [EE-6225] (#10484)
This commit is contained in:
parent
99b39da03d
commit
95d96e1164
3 changed files with 15 additions and 5 deletions
|
@ -39,7 +39,9 @@ export function SliderWithInput({
|
|||
min="0"
|
||||
max={max}
|
||||
value={value}
|
||||
onChange={(e) => onChange(e.target.valueAsNumber)}
|
||||
onChange={({ target: { valueAsNumber: value } }) =>
|
||||
onChange(Number.isNaN(value) ? 0 : value)
|
||||
}
|
||||
className="w-32"
|
||||
data-cy={`${dataCy}Input`}
|
||||
/>
|
||||
|
|
|
@ -62,7 +62,7 @@ export function ResourceQuotaFormSection({
|
|||
className={typeof errors === 'string' ? 'visible' : 'invisible'}
|
||||
>
|
||||
{/* 'error' keeps the formerror the exact same height while hidden so there is no layout shift */}
|
||||
{errors || 'error'}
|
||||
{typeof errors === 'string' ? errors : 'error'}
|
||||
</FormError>
|
||||
<FormControl
|
||||
className="flex flex-row"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue