Skip to content

Commit

Permalink
fix: barlist name type
Browse files Browse the repository at this point in the history
  • Loading branch information
severinlandolt committed May 19, 2024
1 parent c54604f commit 8e38143
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/vis-elements/BarList/BarList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const makeBarListClassName = makeClassName("BarList");
type Bar<T> = T & {
key?: string;
value: number;
name: string;
name: React.ReactNode;
icon?: React.JSXElementConstructor<any>;
href?: string;
target?: string;
Expand Down Expand Up @@ -80,7 +80,7 @@ function BarListInner<T>(props: BarListProps<T>, ref: React.ForwardedRef<HTMLDiv

return (
<Component
key={item.key ?? item.name}
key={item.key ?? crypto.randomUUID()}
onClick={() => {
onValueChange?.(item);
}}
Expand Down Expand Up @@ -174,7 +174,7 @@ function BarListInner<T>(props: BarListProps<T>, ref: React.ForwardedRef<HTMLDiv
<div className={makeBarListClassName("labels")}>
{sortedData.map((item, index) => (
<div
key={item.key ?? item.name}
key={item.key ?? crypto.randomUUID()}
className={tremorTwMerge(
makeBarListClassName("labelWrapper"),
"flex justify-end items-center",
Expand Down

0 comments on commit 8e38143

Please sign in to comment.