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

teableio / teable / 8538004962

03 Apr 2024 11:36AM CUT coverage: 18.233% (-3.3%) from 21.535%
8538004962

Pull #528

github

web-flow
Merge c1a248a6f into 45ee7ebb3
Pull Request #528: feat: Kanban view

575 of 1136 branches covered (50.62%)

29 of 2908 new or added lines in 83 files covered. (1.0%)

5 existing lines in 5 files now uncovered.

6439 of 35315 relevant lines covered (18.23%)

3.94 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
NEW
1
import type { ILinkCellValue } from '@teable/core';
×
NEW
2
import { cn } from '@teable/ui-lib';
×
NEW
3
import { useMemo } from 'react';
×
NEW
4
import type { ICellValue } from '../type';
×
NEW
5

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

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

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

×
NEW
18
  return (
×
NEW
19
    <div className={cn('flex space-x-1', className)} style={style}>
×
NEW
20
      {innerValue?.map((itemVal) => {
×
NEW
21
        const { id, title = 'Unnamed record' } = itemVal;
×
NEW
22
        return (
×
NEW
23
          <span
×
NEW
24
            key={id}
×
NEW
25
            title={title}
×
NEW
26
            className={cn('rounded-md bg-secondary px-2 h-6 leading-6 text-[13px]', itemClassName)}
×
NEW
27
          >
×
NEW
28
            {title}
×
NEW
29
          </span>
×
NEW
30
        );
×
NEW
31
      })}
×
NEW
32
    </div>
×
NEW
33
  );
×
NEW
34
};
×
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