fix(Select): Add support for required attribute
Done
- Implemented the
requiredattribute in theSelectcomponent, ensuring it is correctly passed down to the<select>element. - Updated the Storybook documentation to include examples demonstrating the use of the
requiredattribute. - Added tests to confirm that the
requiredattribute behaves as expected, both when set and not set.
QA
Storybook
To see rendered examples of all react-components, run:
yarn start
QA in your project
from react-components run:
yarn build
npm pack
Install the resulting tarball in your project with:
yarn add <path-to-tarball>
QA steps
- Render the
Selectcomponent with therequiredattribute. - Attempt to submit a form without selecting an option, ensuring the form validation prevents submission.
- Verify that removing the
requiredattribute allows the form to be submitted without selecting an option.
Percy steps
- No visual changes expected
Fixes
Fixes: #1045
kaiweike is not a collaborator of the repo
This PR is being prevented from merging because it needs to be reviewed on Percy.
Go to Percy, find the build relevant to this PR and check if it looks as expected.
Once it's approved, add the label Review: Percy +1 to this PR.
This PR is being prevented from merging because it needs to be reviewed on Percy.
Go to Percy, find the build relevant to this PR and check if it looks as expected.
Once it's approved, add the label
Review: Percy +1to this PR.
I encountered an "Access Denied" issue while trying to access the Percy test results. It seems I don't have the necessary permissions. Could someone please assist with granting me the appropriate access? Thank you!