react-spectrum icon indicating copy to clipboard operation
react-spectrum copied to clipboard

Prevent default when the submit button is clicked while isPending is true

Open sookmax opened this issue 1 year ago • 0 comments

Closes https://github.com/adobe/react-spectrum/issues/6197

I could've placed the logic in disablePendingProps, but thought it might be confusing for the user to see the warning message every time they click on the button while pending.

✅ Pull Request Checklist:

  • [x] Included link to corresponding React Spectrum GitHub Issue.
  • [x] Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • [x] Filled out test instructions.
  • [ ] Updated documentation (if it already exists for this component).
  • [ ] Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

Story

http://localhost:9003/?path=/story/button--pending-spinner&providerSwitcher-express=false&strict=true

https://github.com/adobe/react-spectrum/assets/71210554/4c5a712d-b5eb-4697-b1fd-f25d1720dc36

🧢 Your Project:

sookmax avatar Apr 16 '24 16:04 sookmax