Skip to content

bug: Input Number with Step 0.1 #127

Description

@areski

What version of FlyonUI are you using?

V2.4.1

Which browsers are you seeing the problem on?

All browsers

Describe your issue

It's actually not working well if the increment is 0.1, that cause some rounding issues:

code:

<div class="input max-w-sm" data-input-number='{ "step": 0.1 }'>
      <input type="text" value="0" aria-label="Step control" data-input-number-input />
      <span class="my-auto flex gap-3">
        <button type="button" class="btn btn-primary btn-soft size-5.5 min-h-0 rounded-sm p-0" aria-label="Decrement button" data-input-number-decrement >
          <span class="icon-[tabler--minus] size-3.5 shrink-0"></span>
        </button>
        <button type="button" class="btn btn-primary btn-soft size-5.5 min-h-0 rounded-sm p-0" aria-label="Increment button" data-input-number-increment >
          <span class="icon-[tabler--plus] size-3.5 shrink-0"></span>
        </button>
      </span>
  </div>

Current result:
Image
Clicking plus:

Image

Related: #85

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions