implemented initial eslintFixes
This commit is contained in:
@@ -1,19 +1,20 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
"use client";
|
||||
import { FieldValues, Path, RegisterOptions, UseFormReturn } from "react-hook-form";
|
||||
import SelectTemplate, { Props as SelectTemplateProps, StylesConfig } from "react-select";
|
||||
import { cn } from "@repo/shared-components";
|
||||
import dynamic from "next/dynamic";
|
||||
import { CSSProperties } from "react";
|
||||
|
||||
interface SelectProps<T extends FieldValues> extends Omit<SelectTemplateProps, "form"> {
|
||||
label?: any;
|
||||
label?: React.ReactNode;
|
||||
name: Path<T>;
|
||||
form: UseFormReturn<T> | any;
|
||||
form: UseFormReturn<any>;
|
||||
formOptions?: RegisterOptions<T>;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
}
|
||||
|
||||
const customStyles: StylesConfig<any, false> = {
|
||||
type OptionType = { label: string; value: string };
|
||||
|
||||
const customStyles: StylesConfig<OptionType, false> = {
|
||||
control: (provided) => ({
|
||||
...provided,
|
||||
backgroundColor: "var(--color-base-100)",
|
||||
@@ -55,7 +56,6 @@ const SelectCom = <T extends FieldValues>({
|
||||
label = name,
|
||||
placeholder = label,
|
||||
form,
|
||||
formOptions,
|
||||
className,
|
||||
...inputProps
|
||||
}: SelectProps<T>) => {
|
||||
@@ -74,7 +74,6 @@ const SelectCom = <T extends FieldValues>({
|
||||
});
|
||||
}
|
||||
form.trigger(name);
|
||||
form.Dirty;
|
||||
}}
|
||||
value={
|
||||
(inputProps as any)?.isMulti
|
||||
|
||||
Reference in New Issue
Block a user