• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

teableio / teable / 10265660624

06 Aug 2024 11:29AM UTC coverage: 17.548% (-0.2%) from 17.734%
10265660624

Pull #793

github

web-flow
Merge 055f7bbe6 into 1df1bc808
Pull Request #793: feat: record history

1387 of 2823 branches covered (49.13%)

6 of 1033 new or added lines in 43 files covered. (0.58%)

34 existing lines in 5 files now uncovered.

14088 of 80281 relevant lines covered (17.55%)

1.74 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/packages/sdk/src/components/cell-value/cell-link/CellLink.tsx
1
import type { ILinkCellValue } from '@teable/core';
×
2
import { cn } from '@teable/ui-lib';
×
3
import { useMemo } from 'react';
×
4
import type { ICellValue } from '../type';
×
5

×
6
interface ICellLink extends ICellValue<ILinkCellValue | ILinkCellValue[]> {
×
7
  itemClassName?: string;
×
8
}
×
9

×
10
export const CellLink = (props: ICellLink) => {
×
11
  const { value, className, style, itemClassName } = props;
×
12

×
13
  const innerValue = useMemo(() => {
×
14
    if (value == null || Array.isArray(value)) return value;
×
15
    return [value];
×
16
  }, [value]);
×
17

×
18
  return (
×
NEW
19
    <div className={cn('flex gap-1 flex-wrap', className)} style={style}>
×
20
      {innerValue?.map((itemVal) => {
×
21
        const { id, title = 'Unnamed record' } = itemVal;
×
22
        return (
×
23
          <span
×
24
            key={id}
×
25
            title={title}
×
NEW
26
            className={cn(
×
NEW
27
              'text-[13px] rounded-md bg-secondary px-2 h-6 leading-6 truncate',
×
NEW
28
              itemClassName
×
NEW
29
            )}
×
30
          >
×
31
            {title}
×
32
          </span>
×
33
        );
×
34
      })}
×
35
    </div>
×
36
  );
×
37
};
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc