diff --git a/frontend/pages/hosts/details/cards/Software/HostSoftwareTable/HostSoftwareTable.tsx b/frontend/pages/hosts/details/cards/Software/HostSoftwareTable/HostSoftwareTable.tsx index 99275f7751cd..d601141631cb 100644 --- a/frontend/pages/hosts/details/cards/Software/HostSoftwareTable/HostSoftwareTable.tsx +++ b/frontend/pages/hosts/details/cards/Software/HostSoftwareTable/HostSoftwareTable.tsx @@ -207,6 +207,13 @@ const HostSoftwareTable = ({ ); }, [hostSoftwareFilter, platform, searchQuery]); + // Determines if a user should be able to filter or search in the table + const hasData = data && data.software.length > 0; + const hasQuery = searchQuery !== ""; + const hasSoftwareFilter = hostSoftwareFilter !== "allSoftware"; + + const showFilterHeaders = hasData || hasQuery || hasSoftwareFilter; + return (