mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-16 10:06:42 +03:00
Don't filter all configs
This commit is contained in:
parent
60462b9b45
commit
070faa0d49
@ -39,9 +39,11 @@ export default function ModelSelectionView({
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
const allModels = Object.values(config.classification.custom);
|
return Object.values(config.classification.custom);
|
||||||
|
}, [config]);
|
||||||
|
|
||||||
return allModels.filter((model) => {
|
const selectedClassificationConfigs = useMemo(() => {
|
||||||
|
return classificationConfigs.filter((model) => {
|
||||||
if (pageToggle == "objects" && model.object_config != undefined) {
|
if (pageToggle == "objects" && model.object_config != undefined) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -52,7 +54,7 @@ export default function ModelSelectionView({
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
}, [config, pageToggle]);
|
}, [classificationConfigs, pageToggle]);
|
||||||
|
|
||||||
// new model wizard
|
// new model wizard
|
||||||
|
|
||||||
@ -115,7 +117,7 @@ export default function ModelSelectionView({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex size-full gap-2 p-2">
|
<div className="flex size-full gap-2 p-2">
|
||||||
{classificationConfigs.map((config) => (
|
{selectedClassificationConfigs.map((config) => (
|
||||||
<ModelCard
|
<ModelCard
|
||||||
key={config.name}
|
key={config.name}
|
||||||
config={config}
|
config={config}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user