Skip to content

The min/max value check for the number field can be a bit too restrictive #947

@jc-sw-git

Description

@jc-sw-git

Package

@meteor/admin-sdk

Package version

No response

Browser

Chrome

Operating System

Windows

Link to minimal reproduction

No response

Steps to reproduce

  1. Go to https://meteor-component-library.vercel.app/?path=/story/components-form-mt-number-field--default-story&args=max:80;min:8
  2. Notice that the min value is set to 8 and max is set to 80
  3. Enter for example the enter 70
  4. Now try to edit the value to (for example) 75 by first hitting backspace and then 5

Actual behavior

As soon as you hit backspace at step 4 of the steps to reproduce, the number will automatically be changed from 7 to 8, as 8 is the min value. Therefore you are not able to set the actually desired value. Extension partners have reported other scenarios as well. For example, min/max value are again 8-80, but in their case, when entering 7 it is automatically adjusting to 8 already. This, however, isn't something, that I could reproduce with the link provided above.

Expected behavior

The min/max value check shouldn't be that restrictive and should either add a delay to the check or check on lost focus.

Metadata

Metadata

Labels

priority/highItems that we should do soon.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions