Skip to content

Commit

Permalink
Fix primefaces#6610: MeterGroup render items in percentage
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed May 12, 2024
1 parent 30a0d54 commit 5d847a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/lib/metergroup/MeterGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,13 @@ export const MeterGroup = (inProps) => {
);

const labelIcon = item.icon ? <i {...labelIconProps} /> : <span {...labelListIconProps} />;
const itemPercentage = calculatePercentage(item.value);

return (
<li key={index} {...labelItemProps}>
{labelIcon}
<span {...labelProps}>
{item?.label} {item?.value && `(${item?.value}%)`}
{item?.label} {`(${itemPercentage}%)`}
</span>
</li>
);
Expand Down

0 comments on commit 5d847a2

Please sign in to comment.