diff options
| author | Filip <[email protected]> | 2026-02-02 23:02:56 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-02-02 22:02:56 +0000 |
| commit | aadd2e13d785dc9c4e78cbb1812d6a0eefc2f4d1 (patch) | |
| tree | a7e7c951b5d3b0835cafee10830b7a8961d1c53a /packages/ui/src/components/select.tsx | |
| parent | 531357b40c22be2ac0ff020962f85d393163e015 (diff) | |
| download | opencode-aadd2e13d785dc9c4e78cbb1812d6a0eefc2f4d1.tar.gz opencode-aadd2e13d785dc9c4e78cbb1812d6a0eefc2f4d1.zip | |
fix(app): prompt input overflow issue (#11840)
Diffstat (limited to 'packages/ui/src/components/select.tsx')
| -rw-r--r-- | packages/ui/src/components/select.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/ui/src/components/select.tsx b/packages/ui/src/components/select.tsx index 0386c329e..b370dbb64 100644 --- a/packages/ui/src/components/select.tsx +++ b/packages/ui/src/components/select.tsx @@ -11,6 +11,7 @@ export type SelectProps<T> = Omit<ComponentProps<typeof Kobalte<T>>, "value" | " value?: (x: T) => string label?: (x: T) => string groupBy?: (x: T) => string + valueClass?: ComponentProps<"div">["class"] onSelect?: (value: T | undefined) => void onHighlight?: (value: T | undefined) => (() => void) | void class?: ComponentProps<"div">["class"] @@ -30,6 +31,7 @@ export function Select<T>(props: SelectProps<T> & Omit<ButtonProps, "children">) "value", "label", "groupBy", + "valueClass", "onSelect", "onHighlight", "onOpenChange", @@ -140,7 +142,7 @@ export function Select<T>(props: SelectProps<T> & Omit<ButtonProps, "children">) [local.class ?? ""]: !!local.class, }} > - <Kobalte.Value<T> data-slot="select-select-trigger-value"> + <Kobalte.Value<T> data-slot="select-select-trigger-value" class={local.valueClass}> {(state) => { const selected = state.selectedOption() ?? local.current if (!selected) return local.placeholder || "" |
