[Infra][Hosts] Reset SearchBar refresh state to fully disable auto-refresh (#205416)

## Summary

A bug with the search bar configuration allows for a page that does not
have auto-refresh enabled to inherit the auto-refresh state from another
page that had previously enabled it. This PR fixes that by fully
resetting the state for the page's search bar to ensure auto-refresh is
not active for Hosts page (as it should be).

Closes #205414 

## How to test

- Go to Alerts page
- Click on the Date Quick Selector, enable the auto-refresh feature.
Confirm the refresh icon is on the datepicker now.
- Navigate to Hosts page
- The auto-refresh icon on the Hosts page search bar datepicker should
no longer be visible, and opening the date quick selector should not
show any auto-refresh feature/toggle.
This commit is contained in:
Gonçalo Rica Pais da Silva 2025-01-03 16:04:17 +01:00 committed by GitHub
parent 8d1845208e
commit d25dcc11eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -60,6 +60,7 @@ export const UnifiedSearchBar = () => {
showQueryMenu
useDefaultBehaviors
isAutoRefreshDisabled
isRefreshPaused
/>
</EuiFlexItem>
<EuiFlexItem>