Fix dashboard to refresh visualizations when the refresh button is clicked #27260
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #23329.
This PR updates dashboard so that clicking on the refresh button actually refreshes visualizations.
As of #19172, visualizations don't inherit from the dashboard's search source. As a result, when the search source is updated (even when clicking on the "refresh" button), they don't automatically get the new data that's fetched.
This PR adds an additional property to some of the dashboard components that allows parent components to call
reload()
programmatically, rather than only when state changes happen.Honestly I'm not too thrilled with this change, so I'm open to feedback about other ways we could accomplish this same thing. As far as I could tell the only mechanism for communication between the panels and the dashboard was via state changes.
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.This was checked for cross-browser compatibility, including a check against IE11Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n supportDocumentation was added for features that require explanation or tutorialsThis was checked for keyboard-only and screenreader accessibilityFor maintainers
This was checked for breaking API changes and was labeled appropriately