-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add SelectWidget support for grouped options and placeholder prop #8468
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8468 +/- ##
==========================================
- Coverage 73.47% 73.43% -0.04%
==========================================
Files 1334 1352 +18
Lines 41259 41562 +303
Branches 7686 7799 +113
==========================================
+ Hits 30316 30523 +207
- Misses 10943 11039 +96 ☔ View full report in Codecov by Sentry. |
Playwright test results - MV2Details
Skipped testschrome › tests/extensionConsoleActivation.spec.ts › can activate a mod with built-in integration |
Playwright test results - MV3Details
|
…feature/support_select_widget_grouped_options
…feature/support_select_widget_grouped_options
No loom links were found in the first post. Please add one there if you'd like to it to appear on Slack. Do not edit this comment manually. |
@@ -29,12 +29,18 @@ import useAddCreatablePlaceholder from "@/components/form/widgets/useAddCreatabl | |||
// Type of the Select options | |||
export type Option<TValue = string> = { | |||
label: string; | |||
value: TValue | null; | |||
value: TValue; |
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.
No need for TValue | null
, since we can create type NullableOption = Option<string | null>
and it just works
What does this PR do?
options
prop isn't grouped, and thus passing grouped options breaks the selected option behavior)Discussion
Demo
This change enables grouped options and custom placeholder text, e.g.:

Checklist