-
Notifications
You must be signed in to change notification settings - Fork 432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fleet UI: Switching vuln search types does not cause page re-render #22418
Conversation
@@ -238,7 +247,7 @@ const SoftwareVulnerabilities = ({ | |||
} | |||
}, [queryParams.exploit, isExactMatchQuery]); | |||
|
|||
if (isLoading || isLoadingExactMatch) { | |||
if (isInitialLoad && (isLoading || isLoadingExactMatch)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of adding a whole new state variable and associated useEffect, we could probably just use presence of some existing data/state in this check. Either !query
or !tableData
should work, e.g.
if (!query && (isLoading || isLoadingExactMatch) {...
Wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yo yo, love the suggestion !query
won't work because won't work because changing the search field from a string to empty string causes the loading spinner, but !tableData
will since it's always present after first load! Just tested and all! Thanks!!!
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #22418 +/- ##
==========================================
- Coverage 65.21% 65.21% -0.01%
==========================================
Files 1496 1496
Lines 117161 117162 +1
Branches 3567 3571 +4
==========================================
Hits 76408 76408
Misses 33644 33644
- Partials 7109 7110 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Issue
Cerra #21923
Description
isLoading
andisLoadingExactMatch
turn true on calling a different APIScreenrecording of fix
https://www.loom.com/share/12315498c89d4e8caf8527a9f1e1d498?sid=98023e8c-be25-4625-b014-08934bb9641c
Checklist for submitter
If some of the following don't apply, delete the relevant line.
changes/
,orbit/changes/
oree/fleetd-chrome/changes
.