Skip to content

Conversation

@krowvin
Copy link
Contributor

@krowvin krowvin commented Jul 29, 2025

Talking with @jbkolze he needed to be able to control dropdowns from outside the dropdown component.

This PR shows how that could be done while also maintaining a default of dropdowns state management for you. If you do not handle state by default, when value is not provided, this will break backwards compatibility. (Major Bump)

Documentation was updated to show both scenarios.

Marking as draft pending a larger conversation of not handling state in GW components.

@github-actions
Copy link

Please set a versioning label of either major-bump, minor-bump, or patch-bump to the pull request.

@krowvin krowvin marked this pull request as draft July 29, 2025 15:45
@krowvin
Copy link
Contributor Author

krowvin commented Aug 18, 2025

Remove internal state per previous discussion, pass in props

@krowvin krowvin marked this pull request as ready for review September 16, 2025 04:10
Copy link
Contributor

@jbkolze jbkolze left a comment

Choose a reason for hiding this comment

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

Had a comment on defaultValue. Looks good otherwise.

className,
)}
value={value}
defaultValue={defaultValue}
Copy link
Contributor

Choose a reason for hiding this comment

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

If the component is intended to be React-controlled I don't think we'd want to include a defaultValue. The default value would be handled by the useState hook for the variable being provided to value.

Copy link
Contributor

Choose a reason for hiding this comment

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

Did you intend to include this modal formatting in this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants