Skip to content

Commit

Permalink
Fix primefaces#6650: Multiselect use unique label key
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed May 22, 2024
1 parent cdce35a commit f3e8c58
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/lib/multiselect/MultiSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -894,6 +894,7 @@ export const MultiSelect = React.memo(
}
};
const label = getLabelByValue(val);
const labelKey = label + '_' + i;
const iconProps = mergeProps(
{
key: i,
Expand All @@ -913,14 +914,13 @@ export const MultiSelect = React.memo(

const tokenLabelProps = mergeProps(
{
key: label + i,
className: cx('tokenLabel')
},
ptm('tokenLabel', context)
);

return (
<div {...tokenProps} key={label}>
<div {...tokenProps} key={labelKey}>
<span {...tokenLabelProps}>{label}</span>
{icon}
</div>
Expand Down

0 comments on commit f3e8c58

Please sign in to comment.