NavToolbarActions: Make sure ToolbarActions are renrendered when needed (#89615)

This commit is contained in:
Dominik Prokop 2024-06-24 14:52:02 +02:00 committed by GitHub
parent a89deaeb73
commit 96fda0d6ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,5 +1,5 @@
import { css } from '@emotion/css';
import React, { useEffect, useState } from 'react';
import React, { useEffect, useId, useState } from 'react';
import { GrafanaTheme2 } from '@grafana/data';
import { selectors } from '@grafana/e2e-selectors';
@ -37,7 +37,9 @@ interface Props {
}
export const NavToolbarActions = React.memo<Props>(({ dashboard }) => {
const actions = <ToolbarActions dashboard={dashboard} />;
const id = useId();
const actions = <ToolbarActions dashboard={dashboard} key={id} />;
return <AppChromeUpdate actions={actions} />;
});