• 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-user/CellUser.tsx
NEW
1
import type { IUserCellValue } 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
import { UserTag } from './UserTag';
×
NEW
6

×
NEW
7
interface ICellUser extends ICellValue<IUserCellValue | IUserCellValue[]> {
×
NEW
8
  itemClassName?: string;
×
NEW
9
}
×
NEW
10

×
NEW
11
export const CellUser = (props: ICellUser) => {
×
NEW
12
  const { value, className, style, itemClassName } = props;
×
NEW
13

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

×
NEW
19
  return (
×
NEW
20
    <div className={cn('flex space-x-1', className)} style={style}>
×
NEW
21
      {innerValue?.map((itemVal) => {
×
NEW
22
        const { id, title, avatarUrl } = itemVal;
×
NEW
23
        return <UserTag key={id} label={title} url={avatarUrl} className={itemClassName} />;
×
NEW
24
      })}
×
NEW
25
    </div>
×
NEW
26
  );
×
NEW
27
};
×
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