fix(deps): update dependency eslint-plugin-react-hooks to v5 (#1280)
* fix(deps): update dependency eslint-plugin-react-hooks to v5 * fix: lint issues after reenabling hook rules * fix: format issues --------- Co-authored-by: homarr-renovate[bot] <158783068+homarr-renovate[bot]@users.noreply.github.com> Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
This commit is contained in:
committed by
GitHub
parent
ea43ed0ca4
commit
a87c937b69
@@ -3,13 +3,13 @@ import type { ReactNode } from "react";
|
||||
import type { inferSearchInteractionDefinition } from "./interaction";
|
||||
|
||||
export interface CreateChildrenOptionsProps<TParentOptions extends Record<string, unknown>> {
|
||||
detailComponent: ({ options }: { options: TParentOptions }) => ReactNode;
|
||||
DetailComponent: ({ options }: { options: TParentOptions }) => ReactNode;
|
||||
useActions: (options: TParentOptions, query: string) => ChildrenAction<TParentOptions>[];
|
||||
}
|
||||
|
||||
export interface ChildrenAction<TParentOptions extends Record<string, unknown>> {
|
||||
key: string;
|
||||
component: (option: TParentOptions) => JSX.Element;
|
||||
Component: (option: TParentOptions) => JSX.Element;
|
||||
useInteraction: (option: TParentOptions, query: string) => inferSearchInteractionDefinition<"link" | "javaScript">;
|
||||
hide?: boolean | ((option: TParentOptions) => boolean);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ type CommonSearchGroup<TOption extends Record<string, unknown>, TOptionProps ext
|
||||
// key path is used to define the path to a unique key in the option object
|
||||
keyPath: keyof TOption;
|
||||
title: stringOrTranslation;
|
||||
component: (option: TOption) => JSX.Element;
|
||||
Component: (option: TOption) => JSX.Element;
|
||||
useInteraction: (option: TOption, query: string) => inferSearchInteractionDefinition<SearchInteraction>;
|
||||
onKeyDown?: (
|
||||
event: KeyboardEvent,
|
||||
|
||||
@@ -16,7 +16,7 @@ const searchInteractions = [
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
useActions: CreateChildrenOptionsProps<any>["useActions"];
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
detailComponent: CreateChildrenOptionsProps<any>["detailComponent"];
|
||||
DetailComponent: CreateChildrenOptionsProps<any>["DetailComponent"];
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
option: any;
|
||||
}>(),
|
||||
|
||||
Reference in New Issue
Block a user