Filter tweaks (#3772)

* Use debounce hook
* Wait until search request complete before refreshing results
* Add back null modifiers
* Convert old excludes criterion to includes criterion
* Display criteria with only excludes items as excludes
* Fix depth display
* Reset search after selection
* Add back is modifier to tag filter
* Focus the input dialog after select/unselect
* Update unsupported modifiers
This commit is contained in:
DingDongSoLong4
2023-06-06 06:10:14 +02:00
committed by GitHub
parent de4237e626
commit 09df203bcf
18 changed files with 344 additions and 216 deletions

View File

@@ -8,15 +8,17 @@ import useFocus from "src/utils/focus";
interface IClearableInput {
value: string;
setValue: (value: string) => void;
focus: ReturnType<typeof useFocus>;
}
export const ClearableInput: React.FC<IClearableInput> = ({
value,
setValue,
focus,
}) => {
const intl = useIntl();
const [queryRef, setQueryFocus] = useFocus();
const [queryRef, setQueryFocus] = focus;
const queryClearShowing = !!value;
function onChangeQuery(event: React.FormEvent<HTMLInputElement>) {