Skip to content

Commit

Permalink
fix: onnx can't be selected in download model modal (janhq#3283)
Browse files Browse the repository at this point in the history
Signed-off-by: James <[email protected]>
  • Loading branch information
namchuai authored Aug 7, 2024
1 parent bad481b commit 2521e1d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web/screens/HubScreen2/components/ListModel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,12 @@ const ListModel: React.FC<Props> = ({ modelHandle, onBranchSelected }) => {
useEffect(() => {
if (engineSelections.length === 0) return
setEngineFilter(engineSelections[0].value as EngineType)
}, [engineSelections])

useEffect(() => {
const models = modelBranches.map((m) => m.name)
onBranchSelected?.(models)
}, [engineSelections, modelBranches, onBranchSelected])
}, [modelBranches, onBranchSelected])

const onSelectionChanged = useCallback(
(selectionValue: string) => {
Expand Down

0 comments on commit 2521e1d

Please sign in to comment.