Skip to content

Numberfield numbers less than 0.001 #6836

Answered by jucian0
jucian0 asked this question in Q&A
Discussion options

You must be logged in to vote
<NumberField
   isRequired
   name="size"
   onChange={handleChangeSize}
   step={0.0000001}
   maxValue={parseBytesToMb(maxMaxUsageInput)}
   minValue={0.0000001}
   value={form.values.size}
   formatOptions={{
      minimumFractionDigits: 0,
      maximumFractionDigits: 8,
      notation: "compact",
      style: "unit",
      unit: "megabyte",

   }}
>
   <Label>{t('form.max-usage')} *</Label>
   <FieldGroup>
      <Input />
      <x.span w="30">
         {t('form.space-available', {
            space: formatBytes(resolveFreeSpace),
         })}
      </x.span>
   </FieldGroup>
</NumberField>

Worked for me, thanks!!

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@jucian0
Comment options

Answer selected by snowystinger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants