Skip to content

Commit

Permalink
remove scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
KhudaDad414 committed Jun 12, 2024
1 parent 39f7a29 commit 58934c9
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions packages/ui/components/DropdownChipInput.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

import { FunctionComponent, KeyboardEvent, useRef } from 'react';
import { DropdownMenuCheckboxItemProps } from "@radix-ui/react-dropdown-menu"
import { Chip } from './Chip';
import {
DropdownMenu,
Expand All @@ -11,7 +10,6 @@ import {
import { PlusCircleIcon } from './icons';
import { cn } from '@asyncapi/studio-utils';

type Checked = DropdownMenuCheckboxItemProps["checked"]

interface DropdownChipInputProps {
className?: string;
Expand Down Expand Up @@ -56,12 +54,10 @@ export const DropdownChipInput: FunctionComponent<DropdownChipInputProps> = ({

return (
<div className={cn("flex h-11 p-1 bg-gray-900 rounded border border-gray-800 items-center",isDisabled && "opacity-50 pointer-events-none", className)}>
<div className='flex overflow-scroll no-scrollbar'>
{chips.length === 0 && placeholder && <span className='text-gray-500'>{placeholder}</span>}
{chips.map((chip, index) => (
<Chip key={chip} chip={chip} tabIndex={0} onDelete={handleDelete} onKeyDown={handleChipKeyDown(index)} ref={index === 0 ? firstChipRef : undefined} />
))}
</div>
<DropdownMenu>
<DropdownMenuTrigger asChild>
<PlusCircleIcon className='min-w-7 w-7 h-7 min-h-7 text-gray-500 ml-auto ' />
Expand Down

0 comments on commit 58934c9

Please sign in to comment.