Skip to content

Commit

Permalink
støtte for at value kan være null/undefined i Celle.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
di0nys1us committed Mar 19, 2024
1 parent e7a9036 commit a48a41c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client/src/felleskomponenter/table/Celle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ export const LinkCell = React.memo(({ to, value, id, minLength }: LinkCellProps)
<div data-for={id} data-tip={value}>
{to ? (
<Link to={to}>
<TooltipWrapper visTooltip={value.length > minLength} content={value}>
<TooltipWrapper visTooltip={!!value && value.length > minLength} content={value}>
<TekstMedEllipsis>{value}</TekstMedEllipsis>
</TooltipWrapper>
</Link>
) : (
<>
<TooltipWrapper visTooltip={value.length > minLength} content={value}>
<TooltipWrapper visTooltip={!!value && value.length > minLength} content={value}>
<TekstMedEllipsis>{value}</TekstMedEllipsis>
</TooltipWrapper>
</>
Expand All @@ -78,7 +78,7 @@ export const LinkCell = React.memo(({ to, value, id, minLength }: LinkCellProps)

export const EllipsisCell = React.memo(({ value, minLength }: EllipsisCellProps) => {
return (
<TooltipWrapper visTooltip={value.length > minLength} content={value}>
<TooltipWrapper visTooltip={!!value && value.length > minLength} content={value}>
<TekstMedEllipsis>{value}</TekstMedEllipsis>
</TooltipWrapper>
)
Expand Down

0 comments on commit a48a41c

Please sign in to comment.