File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
packages/ui-components/Common/ChangeHistory Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ const ChangeHistory: FC<ChangeHistoryProps> = ({
1717 label = 'History' ,
1818 changes = [ ] ,
1919 align = 'right' ,
20- className,
20+ className = '' ,
2121 'aria-label' : ariaLabel = label ,
2222 ...props
2323} ) => (
@@ -37,7 +37,7 @@ const ChangeHistory: FC<ChangeHistoryProps> = ({
3737 aria-label = { ariaLabel }
3838 >
3939 < div className = { styles . dropdownContentInner } >
40- { changes . map ( ( change , index ) => {
40+ { changes . map ( change => {
4141 const content = (
4242 < >
4343 < div className = { styles . dropdownLabel } > { change . label } </ div >
@@ -47,12 +47,14 @@ const ChangeHistory: FC<ChangeHistoryProps> = ({
4747 </ >
4848 ) ;
4949
50+ const ariaLabel = `${ change . label } : ${ change . versions . join ( ', ' ) } ` ;
51+
5052 const itemProps = {
51- key : index ,
53+ key : ariaLabel ,
5254 className : styles . dropdownItem ,
5355 role : 'menuitem' ,
5456 tabIndex : 0 ,
55- [ 'aria-label' ] : ` ${ change . label } : ${ change . versions . join ( ', ' ) } ` ,
57+ [ 'aria-label' ] : ariaLabel ,
5658 } ;
5759
5860 return change . url ? (
You can’t perform that action at this time.
0 commit comments