mirror of
https://github.com/snowball-tools/snowballtools-base.git
synced 2024-12-22 12:37:42 +00:00
fix: ProjectSearchBarDialog suppressRefError
(#222)
This PR resolves issues with the Project Search Bar component where `getMenuProps` was causing reference errors. By adding `suppressRefError: true` to `getMenuProps` in both `ProjectSearchBar` and `ProjectSearchBarDialog`, the warnings are suppressed. ---
This commit is contained in:
parent
f981f1a3f6
commit
41bcb2e7d0
@ -62,7 +62,7 @@ export const ProjectSearchBar = ({ onChange }: ProjectSearchBarProps) => {
|
|||||||
<div className="relative w-full lg:w-fit">
|
<div className="relative w-full lg:w-fit">
|
||||||
<SearchBar {...getInputProps()} />
|
<SearchBar {...getInputProps()} />
|
||||||
<div
|
<div
|
||||||
{...getMenuProps()}
|
{...getMenuProps({}, { suppressRefError: true })}
|
||||||
className={cn(
|
className={cn(
|
||||||
'flex flex-col shadow-dropdown rounded-xl bg-surface-card absolute w-[459px] max-h-52 overflow-y-auto px-2 py-2 gap-1 z-50',
|
'flex flex-col shadow-dropdown rounded-xl bg-surface-card absolute w-[459px] max-h-52 overflow-y-auto px-2 py-2 gap-1 z-50',
|
||||||
{ hidden: !inputValue || !isOpen },
|
{ hidden: !inputValue || !isOpen },
|
||||||
|
@ -80,7 +80,7 @@ export const ProjectSearchBarDialog = ({
|
|||||||
<div className="h-full flex flex-col fixed top-0 inset-0">
|
<div className="h-full flex flex-col fixed top-0 inset-0">
|
||||||
<div className="py-2.5 px-4 flex items-center justify-between border-b border-border-separator/[0.06]">
|
<div className="py-2.5 px-4 flex items-center justify-between border-b border-border-separator/[0.06]">
|
||||||
<Input
|
<Input
|
||||||
{...getInputProps()}
|
{...getInputProps({}, { suppressRefError: true })}
|
||||||
leftIcon={<SearchIcon />}
|
leftIcon={<SearchIcon />}
|
||||||
placeholder="Search"
|
placeholder="Search"
|
||||||
appearance="borderless"
|
appearance="borderless"
|
||||||
@ -91,7 +91,15 @@ export const ProjectSearchBarDialog = ({
|
|||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
{/* Content */}
|
{/* Content */}
|
||||||
<div className="flex flex-col gap-1 px-2 py-2" {...getMenuProps()}>
|
<div
|
||||||
|
className="flex flex-col gap-1 px-2 py-2"
|
||||||
|
{...getMenuProps(
|
||||||
|
{},
|
||||||
|
{
|
||||||
|
suppressRefError: true,
|
||||||
|
},
|
||||||
|
)}
|
||||||
|
>
|
||||||
{items.length > 0
|
{items.length > 0
|
||||||
? items.map((item, index) => (
|
? items.map((item, index) => (
|
||||||
<>
|
<>
|
||||||
|
Loading…
Reference in New Issue
Block a user