Refactor Filter type to accept Is, Is Not, Contains, Does not Contain (#128)

* Refactor Filter type to accept Is, Is Not, Contains, Does not Contain

* Remove any and add tests
This commit is contained in:
Charles Bochet
2023-05-18 15:32:57 +02:00
committed by GitHub
parent 4211d5872b
commit 5286dfd695
20 changed files with 241 additions and 336 deletions

View File

@ -2,10 +2,8 @@ import { ChangeEvent, ComponentType, useState } from 'react';
import EditableCellWrapper from './EditableCellWrapper';
import styled from '@emotion/styled';
import { useSearch } from '../../services/api/search/search';
import {
SearchConfigType,
SearchableType,
} from '../../interfaces/search/interface';
import { SearchConfigType } from '../../interfaces/search/interface';
import { AnyEntity } from '../../interfaces/entities/generic.interface';
const StyledEditModeContainer = styled.div`
width: 200px;
@ -51,7 +49,7 @@ const StyledEditModeResultItem = styled.div`
`;
export type EditableRelationProps<
RelationType extends SearchableType,
RelationType extends AnyEntity,
ChipComponentPropsType,
> = {
relation?: RelationType | null;
@ -66,7 +64,7 @@ export type EditableRelationProps<
};
function EditableRelation<
RelationType extends SearchableType,
RelationType extends AnyEntity,
ChipComponentPropsType,
>({
relation,