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

fix(Select): Add support for required attribute

Open kaiweike opened this issue 1 year ago • 3 comments

Done

  • Implemented the required attribute in the Select component, ensuring it is correctly passed down to the <select> element.
  • Updated the Storybook documentation to include examples demonstrating the use of the required attribute.
  • Added tests to confirm that the required attribute 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

  1. Render the Select component with the required attribute.
  2. Attempt to submit a form without selecting an option, ensuring the form validation prevents submission.
  3. Verify that removing the required attribute allows the form to be submitted without selecting an option.

Percy steps

  • No visual changes expected

Fixes

Fixes: #1045

kaiweike avatar Jul 30 '24 07:07 kaiweike

kaiweike is not a collaborator of the repo

webteam-app avatar Jul 30 '24 07:07 webteam-app

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.

github-actions[bot] avatar Jul 30 '24 07:07 github-actions[bot]

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.

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!

kaiweike avatar Jul 30 '24 08:07 kaiweike