Add (not) between modifiers for number criterion (#1559)

* Add (not) between modifiers for number criterion
* Extract list filters into dedicated components

Extract the filters from the AddFiltersDialog into custom components.
This allows for further refactorring where components will be bound to
criterions.

* Add placeholders to number and duration criterions
* Add backwards compatibility for saved filters

Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
gitgiggety
2021-08-12 02:24:16 +02:00
committed by GitHub
parent c29d8b547d
commit 7cb3d05535
19 changed files with 623 additions and 278 deletions

View File

@@ -13,6 +13,7 @@ interface IProps {
): void;
onReset?(): void;
className?: string;
placeholder?: string;
}
export const DurationInput: React.FC<IProps> = (props: IProps) => {
@@ -108,7 +109,13 @@ export const DurationInput: React.FC<IProps> = (props: IProps) => {
props.onValueChange(undefined);
}
}}
placeholder={!props.disabled ? "hh:mm:ss" : undefined}
placeholder={
!props.disabled
? props.placeholder
? `${props.placeholder} (hh:mm:ss)`
: "hh:mm:ss"
: undefined
}
/>
<InputGroup.Append>
{maybeRenderReset()}