-
Notifications
You must be signed in to change notification settings - Fork 21
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
1684 components dropdown controlled mode #1708
Conversation
b9ec15c
to
0e442f3
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1708 +/- ##
==========================================
- Coverage 97.39% 97.25% -0.14%
==========================================
Files 689 689
Lines 4793 4804 +11
Branches 1743 1748 +5
==========================================
+ Hits 4668 4672 +4
- Misses 125 132 +7 ☔ View full report in Codecov by Sentry. |
0e442f3
to
ad19e16
Compare
|
||
return ( | ||
<div className="w-sz-480 pb-[300px]"> | ||
<Dropdown value={value} onValueChange={setValue}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The value is not handled by the Dropdown.value component?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually no :) We read the Radix doc too fast last time. Dropdown.Value
is just for the display of the current selected value inside the trigger, but it does not manage it. Radix doc about Dropdown.Value
: "The part that reflects the selected value. By default the selected item's text will be rendered."
All the main props are on the root element: https://www.radix-ui.com/primitives/docs/components/select#root
And this is also how we did for other components until now:
ad19e16
to
0052903
Compare
TYPE(SCOPE): TITLE
TASK: #1684
Description, Motivation and Context
Controlled mode is provided for two features:
value
management usingvalue, onValueChange, defaultValue
to stick with other Spark components APIopen
management usingopen, onOpenChange, defaultOpen
to stick with other Spark components APITypes of changes