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

teableio / teable / 8536869866

03 Apr 2024 10:05AM CUT coverage: 21.234% (-0.3%) from 21.535%
8536869866

Pull #514

github

web-flow
Merge 91a25d710 into 45ee7ebb3
Pull Request #514: refactor: user and link selector

1394 of 2532 branches covered (55.06%)

27 of 1620 new or added lines in 60 files covered. (1.67%)

4 existing lines in 2 files now uncovered.

14588 of 68702 relevant lines covered (21.23%)

2.02 hits per line

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

0.0
/packages/sdk/src/components/filter/component/filter-link/FilterLink.tsx
NEW
1
import { INPUT_OPERATORS } from './constant';
×
NEW
2
import { FilterLinkInput } from './FilterLinkInput';
×
NEW
3
import { FilterLinkSelect } from './FilterLinkSelect';
×
NEW
4
import type { IFilterLinkProps } from './types';
×
NEW
5

×
NEW
6
export const FilterLink = (props: IFilterLinkProps) => {
×
NEW
7
  return (
×
NEW
8
    <FilterLinkBase
×
NEW
9
      {...props}
×
NEW
10
      components={{
×
NEW
11
        Input: FilterLinkInput,
×
NEW
12
        Select: FilterLinkSelect,
×
NEW
13
      }}
×
NEW
14
    />
×
NEW
15
  );
×
NEW
16
};
×
NEW
17

×
NEW
18
interface IFilterLinkBaseProps extends IFilterLinkProps {
×
NEW
19
  components?: {
×
NEW
20
    Input?: typeof FilterLinkInput;
×
NEW
21
    Select?: typeof FilterLinkSelect;
×
NEW
22
  };
×
NEW
23
}
×
NEW
24

×
NEW
25
export const FilterLinkBase = (props: IFilterLinkBaseProps) => {
×
NEW
26
  const { components, ...rest } = props;
×
NEW
27
  const isInput = INPUT_OPERATORS.includes(props.operator);
×
NEW
28
  const InputCom = components?.Input ?? FilterLinkInput;
×
NEW
29
  const SelectCom = components?.Select ?? FilterLinkSelect;
×
NEW
30

×
NEW
31
  if (isInput) {
×
NEW
32
    return <InputCom {...rest} value={rest.value as string} />;
×
NEW
33
  }
×
NEW
34
  return <SelectCom {...rest} />;
×
NEW
35
};
×
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