mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
Fleet UI: Prevent software card from disappearing when no vulns detected on software (#28708)
This commit is contained in:
parent
9767cb5c91
commit
b737b3f681
1 changed files with 5 additions and 1 deletions
|
|
@ -330,7 +330,11 @@ const DashboardPage = ({ router, location }: IDashboardProps): JSX.Element => {
|
|||
keepPreviousData: true,
|
||||
staleTime: 30000, // stale time can be adjusted if fresher data is desired based on software inventory interval
|
||||
onSuccess: (data) => {
|
||||
if (data.software?.length > 0) {
|
||||
const hasSoftwareResults = data.software?.length > 0;
|
||||
const viewingVulnSoftwareTab = softwareNavTabIndex === 1;
|
||||
|
||||
// Prevent card from hiding if returns results or on-clicking vuln tab if software has no vulnerabilities
|
||||
if (hasSoftwareResults || viewingVulnSoftwareTab) {
|
||||
setSoftwareTitleDetail &&
|
||||
setSoftwareTitleDetail(
|
||||
<LastUpdatedText
|
||||
|
|
|
|||
Loading…
Reference in a new issue