[Logs / Metrics UI] [NP followup] Make sure application links don't cause a page reload #58007
Labels
Feature:Logs UI
Logs UI feature
Feature:Metrics UI
Metrics UI feature
Team:Infra Monitoring UI - DEPRECATED
DEPRECATED - Label for the Infra Monitoring UI team. Use Team:obs-ux-infra_services
As part of #54583 we migrated to browser based history, rather than hash based history. This produces a different behaviour now whereby standard links with a
href
attribute will cause a full page reload (as there's no connection to ourhistory
instance).The solution here is to make sure that where we render links (to our own apps) we supply both an
onClick
and ahref
, theonClick
handler should prevent the default behaviour, and insteadpush
onto ourhistory
instance.We are already doing this for the
<RoutedTabs />
component. This is the behaviour we desire.An example of where this is broken is the Node context menu, here
react-router
navigation hasn't been accounted for.The desired outcome of this ticket would be to have something reusable we can just drop in wherever we want a link, that will provide a correct
href
attribute and correctreact-router
handling.EUI provide some official guidance here.
The text was updated successfully, but these errors were encountered: