react-spectrum
react-spectrum copied to clipboard
fix: prevent form submission when required Select has more than 300 options and no selection
Closes https://github.com/adobe/react-spectrum/issues/8034
✅ 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.
- [x] Updated documentation (if it already exists for this component).
- [x] Looked at the Accessibility Practices for this feature - Aria Practices
📝 Test Instructions:
- Added a "Required Select With Many Items" story to RAC storybook to manually verify the behavior, since required select validation cannot currently be tested in the jsdom environment (see: http://github.com/jsdom/jsdom/issues/2898).