Merge pull request #6246 from menloresearch/fix/sort-filter-hub
fix: hidden sort filter when searching model
This commit is contained in:
commit
43ab6dfc65
@ -146,14 +146,16 @@ function Hub() {
|
|||||||
}
|
}
|
||||||
// Apply downloaded filter
|
// Apply downloaded filter
|
||||||
if (showOnlyDownloaded) {
|
if (showOnlyDownloaded) {
|
||||||
filtered = filtered?.map((model) => ({
|
filtered = filtered
|
||||||
|
?.map((model) => ({
|
||||||
...model,
|
...model,
|
||||||
quants: model.quants.filter((variant) =>
|
quants: model.quants.filter((variant) =>
|
||||||
llamaProvider?.models.some(
|
llamaProvider?.models.some(
|
||||||
(m: { id: string }) => m.id === variant.model_id
|
(m: { id: string }) => m.id === variant.model_id
|
||||||
)
|
)
|
||||||
)
|
),
|
||||||
})).filter((model) => model.quants.length > 0)
|
}))
|
||||||
|
.filter((model) => model.quants.length > 0)
|
||||||
}
|
}
|
||||||
// Add HuggingFace repo at the beginning if available
|
// Add HuggingFace repo at the beginning if available
|
||||||
if (huggingFaceRepo) {
|
if (huggingFaceRepo) {
|
||||||
@ -428,6 +430,7 @@ function Hub() {
|
|||||||
const isLastStep = currentStepIndex === steps.length - 1
|
const isLastStep = currentStepIndex === steps.length - 1
|
||||||
|
|
||||||
const renderFilter = () => {
|
const renderFilter = () => {
|
||||||
|
if (searchValue.length === 0)
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user