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

bug(@vtmn/react): VtmnQuantity "-" and "+" buttons should not validate form instantly #1447

Open
gregorygossart opened this issue Jun 23, 2023 · 1 comment
Labels
bug 🐛 Something isn't working community 👥 As we stopped improvements for this version of Vitamin, this issue needs to be done by the community React 🔵 Related to React components library

Comments

@gregorygossart
Copy link

Describe the bug
When used inside a form, VtmnQuantity "-" and "+" button validate form on click

Steps to reproduce

  1. Create a form
  2. Add a validation system on the form
  3. Add an input with a required value inside the form
  4. Add a VtmnQuantity inside the form
  5. Do not fill the input
  6. Click on the "-" or "+" button of VtmnQuantity
  7. Form is validated and required input is displayed as "with error"

Expected behavior
VtmnQuantity "-" and "+" buttons should not validate the form on click.

An easy fix would be to add a type="button" directly on these two buttons.
A better way would be to add a default prop type = "button" on VtmnButton, but that could break the way some other components work.

Browsers affected
Chrome

Version affected
"@vtmn/react": "^3.1.2"

@gregorygossart gregorygossart added the bug 🐛 Something isn't working label Jun 23, 2023
@lauthieb lauthieb added the community 👥 As we stopped improvements for this version of Vitamin, this issue needs to be done by the community label Jun 23, 2023
@lauthieb lauthieb added the React 🔵 Related to React components library label Jul 3, 2023
@lauthieb lauthieb changed the title bug: VtmnQuantity "-" and "+" buttons should not validate form instantly bug(@vtmn/react): VtmnQuantity "-" and "+" buttons should not validate form instantly Jul 3, 2023
@stale
Copy link

stale bot commented Aug 31, 2023

This has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Feel free to reopen whenever you want. Thank you for your contributions.

@stale stale bot added the wontfix 🚫 This will not be worked on label Aug 31, 2023
@lauthieb lauthieb removed the wontfix 🚫 This will not be worked on label Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working community 👥 As we stopped improvements for this version of Vitamin, this issue needs to be done by the community React 🔵 Related to React components library
Projects
Status: 🔖 Dev to do
Development

No branches or pull requests

2 participants