Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new prop to disallow empty for <n-input-number> #6610

Open
3 tasks done
gitcobra opened this issue Dec 10, 2024 · 0 comments
Open
3 tasks done

Add new prop to disallow empty for <n-input-number> #6610

gitcobra opened this issue Dec 10, 2024 · 0 comments
Labels
feature request New feature or request

Comments

@gitcobra
Copy link

gitcobra commented Dec 10, 2024

<n-input-number> rejects non-numeric values by default, but when the input box is empty, the value is set to null even if min prop exists.

This behavior is intentional probably, but I think there are many cases where we need only a valid number without empty.

Currently I have to set on-update:value or on-blur to reject null.

Suggested solution

I suggest something new prop to disallow empty like

:disallow-empty="true"
or
:allow-empty="false"
etc..

If the prop specified and the input box is empty, the value should be the same as min prop or 0.

Alternative

No response

Additional context

No response

Validations

  • Read the Contributing Guidelines.
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
@gitcobra gitcobra added the feature request New feature or request label Dec 10, 2024
@gitcobra gitcobra changed the title Add new prop to allow only numbers, not null, for <n-input-number> Add new prop to disallow empty for <n-input-number> Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant