fix: correct node filtering logic to properly detect when filtered guests are provided

This commit is contained in:
Pulse Monitor 2025-08-26 11:22:53 +00:00
parent 063cd670a6
commit 511f5b60a4

View file

@ -15,11 +15,10 @@ interface PVENodeTableProps {
}
export const PVENodeTable: Component<PVENodeTableProps> = (props) => {
// Check if we have active filtering (fewer guests than total)
// Check if we have active filtering (receiving filtered guests)
const hasActiveFilter = createMemo(() => {
const vmsCount = props.vms?.length || 0;
const containersCount = props.containers?.length || 0;
return vmsCount > 0 || containersCount > 0;
// If vms or containers props are explicitly passed, we're filtering
return props.vms !== undefined || props.containers !== undefined;
});
// Filter and sort nodes - only show nodes with matching guests when filtering