Skip to content

Commit

Permalink
fix: making non-function values to function slots for better performa…
Browse files Browse the repository at this point in the history
…nce in the data table
  • Loading branch information
oliviareichl committed Aug 13, 2024
1 parent a44228f commit 59bb771
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions components/search-results-table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,22 @@ const cols = [
cell: (info) => {
const icon = getEntityIcon(info.getValue());
const tooltipWrapper = h(TooltipProvider, {}, [
h(Tooltip, {}, [
h(
TooltipTrigger,
{ class: "cursor-default" },
icon ? h(icon, { class: "size-4 shrink-0" }) : h("span", {}, info.getValue()),
),
h(TooltipContent, {}, t(`SystemClassNames.${info.getValue()}`)),
]),
]);
const tooltipWrapper = h(TooltipProvider, {}, () => {
return [
h(Tooltip, {}, () => {
return [
h(TooltipTrigger, { class: "cursor-default" }, () => {
return icon
? h(icon, { class: "size-4 shrink-0" })
: h("span", {}, info.getValue());
}),
h(TooltipContent, {}, () => {
return t(`SystemClassNames.${info.getValue()}`);
}),
];
}),
];
});
const root = h("span", {}, [
tooltipWrapper,
Expand Down Expand Up @@ -140,7 +146,9 @@ const cols = [
},
},
},
title,
() => {
return title;
},
);
},
}),
Expand Down

0 comments on commit 59bb771

Please sign in to comment.