Fixed position on command when filtering
This commit is contained in:
parent
ea211060b3
commit
ca460443d1
2 changed files with 10 additions and 4 deletions
|
|
@ -586,13 +586,14 @@ export default function ParameterComponent({
|
|||
optionsIcon="Globe"
|
||||
optionsButton={
|
||||
<AddNewVariableButton>
|
||||
<CommandItem>
|
||||
<CommandItem value="doNotFilter-addNewVariable">
|
||||
<IconComponent
|
||||
name="Plus"
|
||||
className={cn("mr-2 h-4 w-4 text-primary")}
|
||||
aria-hidden="true"
|
||||
/>
|
||||
Add New Variable
|
||||
<span>Add New Variable</span>
|
||||
|
||||
</CommandItem>
|
||||
</AddNewVariableButton>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -136,10 +136,15 @@ export default function InputComponent({
|
|||
side="bottom"
|
||||
align="center"
|
||||
>
|
||||
<Command>
|
||||
<Command
|
||||
filter={(value, search) => {
|
||||
if (value.includes(search) || value.includes("doNotFilter-"))
|
||||
return 1; // ensures items arent filtered
|
||||
return 0;
|
||||
}}
|
||||
>
|
||||
<CommandInput placeholder={optionsPlaceholder} />
|
||||
<CommandList>
|
||||
<CommandEmpty>No results found.</CommandEmpty>
|
||||
<CommandGroup defaultChecked={false}>
|
||||
{options.map((option, id) => (
|
||||
<CommandItem
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue