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

Fix: Render children in MySelect component to display options #3998

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

rohitKumar38344
Copy link
Contributor

The original example did not render the children prop, which resulted in the select element not displaying the options passed as children. This PR updates the MySelect component to properly handle the children prop and render the options inside the dropdown.

Changes Made

Updated MySelect component to include the children prop inside the select element.
This ensures that the options passed as children (e.g., tags) are correctly displayed in the dropdown list.

Issue Addressed

Incorrect example in the documentation where options passed to the MySelect component were not being rendered.

Testing

Verified that the options now render correctly in the MySelect component by testing it with the provided example from the tutorial.

Additional Notes

This PR only fixes the example in the docs and does not introduce any breaking changes.

Copy link

changeset-bot bot commented Oct 8, 2024

⚠️ No Changeset found

Latest commit: 73a434a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Oct 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
formik-docs ⬜️ Ignored (Inspect) Visit Preview Oct 8, 2024 5:14pm

Copy link

codesandbox-ci bot commented Oct 8, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@@ -849,12 +849,13 @@ const MyCheckbox = ({ children, ...props }) => {
);
};

const MySelect = ({ label, ...props }) => {
const MySelect = ({children, label, ...props }) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const MySelect = ({children, label, ...props }) => {
const MySelect = ({ children, label, ...props }) => {

Copy link
Collaborator

@quantizor quantizor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks 😄

@kodiakhq kodiakhq bot merged commit 0e0cf9e into jaredpalmer:main Oct 9, 2024
9 checks passed
@rohitKumar38344
Copy link
Contributor Author

Even after merging the commit why website is not reflecting the updated changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants