summaryrefslogtreecommitdiffhomepage
path: root/packages/ui/src/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'packages/ui/src/hooks')
-rw-r--r--packages/ui/src/hooks/use-filtered-list.tsx8
1 files changed, 2 insertions, 6 deletions
diff --git a/packages/ui/src/hooks/use-filtered-list.tsx b/packages/ui/src/hooks/use-filtered-list.tsx
index ca9bc5388..e0cb6e7aa 100644
--- a/packages/ui/src/hooks/use-filtered-list.tsx
+++ b/packages/ui/src/hooks/use-filtered-list.tsx
@@ -11,10 +11,7 @@ export interface FilteredListProps<T> {
current?: T
groupBy?: (x: T) => string
sortBy?: (a: T, b: T) => number
- sortGroupsBy?: (
- a: { category: string; items: T[] },
- b: { category: string; items: T[] },
- ) => number
+ sortGroupsBy?: (a: { category: string; items: T[] }, b: { category: string; items: T[] }) => number
onSelect?: (value: T | undefined) => void
}
@@ -25,8 +22,7 @@ export function useFilteredList<T>(props: FilteredListProps<T>) {
() => store.filter,
async (filter) => {
const needle = filter?.toLowerCase()
- const all =
- (typeof props.items === "function" ? await props.items(needle) : props.items) || []
+ const all = (typeof props.items === "function" ? await props.items(needle) : props.items) || []
const result = pipe(
all,
(x) => {