diff options
| author | David Hill <[email protected]> | 2026-01-24 21:08:04 +0000 |
|---|---|---|
| committer | David Hill <[email protected]> | 2026-01-24 22:02:09 +0000 |
| commit | 8845f2b92687c72a454766879d1c41517d6b0ba9 (patch) | |
| tree | 54a2cab5c08f64f6d97ddef404735d28331536c7 /packages/ui | |
| parent | df4d839577b69d90246f494949783ce212677db8 (diff) | |
| download | opencode-8845f2b92687c72a454766879d1c41517d6b0ba9.tar.gz opencode-8845f2b92687c72a454766879d1c41517d6b0ba9.zip | |
feat(ui): add onFilter callback to List, discard add server row when searching
Diffstat (limited to 'packages/ui')
| -rw-r--r-- | packages/ui/src/components/list.tsx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/packages/ui/src/components/list.tsx b/packages/ui/src/components/list.tsx index 5f585f90c..2132897f7 100644 --- a/packages/ui/src/components/list.tsx +++ b/packages/ui/src/components/list.tsx @@ -38,6 +38,7 @@ export interface ListProps<T> extends FilteredListProps<T> { loadingMessage?: string onKeyEvent?: (event: KeyboardEvent, item: T | undefined) => void onMove?: (item: T | undefined) => void + onFilter?: (value: string) => void activeIcon?: IconProps["name"] filter?: string search?: ListSearchProps | boolean @@ -98,6 +99,7 @@ export function List<T>(props: ListProps<T> & { ref?: (ref: ListRef) => void }) const current = internalFilter() if (prev !== current) { onInput(current) + props.onFilter?.(current) } return current }, "") |
