Skip to content

Commit 5cd6453

Browse files
committed
github repo in memory search fix
1 parent c350dbf commit 5cd6453

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

frontend/src/components/repository-table.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import { Button, CollectionService, DataGrid, Icon, icons, Loader } from '@furys
66
import { ObservableValue } from '@furystack/utils'
77
import { GitHubRepository } from 'common'
88

9+
import { applyClientFindOptions } from '../utils/apply-client-find-options.js'
10+
911
type RepositoryTableProps = {
1012
stackName: string
1113
}
@@ -36,15 +38,13 @@ export const RepositoryTable = Shade<RepositoryTableProps>({
3638

3739
const reposState = useCollectionSync(options, GitHubRepository, {
3840
filter: { stackName: { $eq: props.stackName } },
39-
top: currentFindOptions.top,
40-
skip: currentFindOptions.skip,
41-
order: currentFindOptions.order,
4241
})
4342

4443
const isLoading = reposState.status === 'connecting'
45-
const entries = reposState.status === 'synced' || reposState.status === 'cached' ? reposState.data.entries : []
46-
const count = reposState.status === 'synced' || reposState.status === 'cached' ? reposState.data.count : 0
44+
const allEntries =
45+
reposState.status === 'synced' || reposState.status === 'cached' ? reposState.data.entries : []
4746

47+
const { entries, count } = applyClientFindOptions(allEntries, currentFindOptions)
4848
collectionService.data.setValue({ entries, count })
4949

5050
if (isLoading) {

0 commit comments

Comments
 (0)