We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I tried to use ui/sidebar in the production code
ui/sidebar
Checking validity of types ..Failed to compile. ./components/ui/sidebar.tsx:439:7 Type error: Type 'string | ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement> | null' is not assignable to type '((string | ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement>) & (((instance: HTMLElement | null) => void) | RefObject<...>)) | null | undefined'. Type 'string' is not assignable to type '((string | ((instance: HTMLDivElement | null) => void) | RefObject<HTMLDivElement>) & (((instance: HTMLElement | null) => void) | RefObject<...>)) | null | undefined'. 437 | return ( 438 | <Comp > 439 | ref={ref} | ^ 440 | data-sidebar="group-label" 441 | className={cn( 442 | "duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
there is some type error. in the file sidebar.tsx
possible fix: changing ref={ref} to ref={ref as any} in the file ui/sidebar.tsx worked for me.
ref={ref}
ref={ref as any}
ui/sidebar.tsx
create a new nextjs + ts project. use the sidebar component and try
npm run build
No response
Minimum Requirements. (i5 10 gen, chrome browser)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
When I tried to use
ui/sidebar
in the production codethere is some type error. in the file sidebar.tsx
possible fix: changing
ref={ref}
toref={ref as any}
in the fileui/sidebar.tsx
worked for me.Affected component/components
ui/sidebar.tsx
How to reproduce
create a new nextjs + ts project. use the sidebar component and try
npm run build
Codesandbox/StackBlitz link
No response
Logs
No response
System Info
Before submitting
The text was updated successfully, but these errors were encountered: