[dashboard] fix 'Each child in list should have a unique key prop' warning in PresentationPanelHeader (#187118)

Fixes
<img width="600" alt="Screenshot 2024-06-27 at 2 47 07 PM"
src="44d0162c-ae6f-4995-a780-711ff59727a8">


### test steps
* in cloud 7.17. instance, create legacy input control visualization and
export saved object
* in local instance, import legacy input control vis
* create new dashboard and add legacy input control vis
* Open console and ensure no warnings are displayed when `deprecated`
badge is displayed

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Nathan Reese 2024-06-28 09:22:27 -06:00 committed by GitHub
parent 125b716fa9
commit 3bc6973019
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -141,7 +141,9 @@ export const usePresentationPanelHeaderActions = <
);
return tooltipText ? (
<EuiToolTip content={tooltipText}>{badgeElement}</EuiToolTip>
<EuiToolTip key={badge.id} content={tooltipText}>
{badgeElement}
</EuiToolTip>
) : (
badgeElement
);