fix faulty key prop for dropdown item

pull/5370/head
Joseph Izang 2 years ago committed by Aniket
parent 1374cff5d3
commit f92bd6b42f
  1. 7
      libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx

@ -523,7 +523,8 @@ export function Workspace () {
</div> </div>
</CustomTooltip>, </CustomTooltip>,
] ]
let menuLength = workspaceMenuIcons.length
let count = 0
return ( return (
<div className='d-flex flex-column justify-content-between h-100'> <div className='d-flex flex-column justify-content-between h-100'>
<div className='remixui_container overflow-auto' style={{ maxHeight: selectedWorkspace && selectedWorkspace.isGitRepo ? '95%' : '100%' }}> <div className='remixui_container overflow-auto' style={{ maxHeight: selectedWorkspace && selectedWorkspace.isGitRepo ? '95%' : '100%' }}>
@ -567,10 +568,10 @@ export function Workspace () {
icon={'fas fa-bars'} icon={'fas fa-bars'}
></Dropdown.Toggle> ></Dropdown.Toggle>
<Dropdown.Menu as={CustomMenu} data-id="wsdropdownMenu" className='custom-dropdown-items remixui_menuwidth' rootCloseEvent="click"> <Dropdown.Menu as={CustomMenu} data-id="wsdropdownMenu" className='custom-dropdown-items remixui_menuwidth' rootCloseEvent="click">
{ {
workspaceMenuIcons.map(m => { workspaceMenuIcons.map(m => {
return ( return (
<Dropdown.Item key={`wsdropdownMenu-${new Date().getMilliseconds()}`}> <Dropdown.Item key={`wsdropdownMenu-${count !== menuLength ? count++ : count }`}>
{m} {m}
</Dropdown.Item> </Dropdown.Item>
) )

Loading…
Cancel
Save