Skip to content

Commit

Permalink
resolve sonar issues
Browse files Browse the repository at this point in the history
  • Loading branch information
KhudaDad414 committed Jun 11, 2024
1 parent fa640ac commit 6bf9a07
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export const Default: Story = {
return (
<DropdownChipInput
className='w-96'
id="chip-input-id-chip-text"
chips={currentChips}
onChange={setCurrentChips}
chipsOptions={OPTIONS}/>
Expand All @@ -39,7 +38,6 @@ export const Disabled: Story = {
return (
<DropdownChipInput
className='w-96'
id="chip-input-id-chip-text"
chips={currentChips}
onChange={setCurrentChips}
isDisabled={true}
Expand All @@ -55,7 +53,6 @@ export const WithPlaceholder: Story = {
<DropdownChipInput
className='w-96'
placeholder='Add a chip'
id="chip-input-id-chip-text"
chips={currentChips}
onChange={setCurrentChips}
chipsOptions={OPTIONS}/>
Expand Down
3 changes: 1 addition & 2 deletions packages/ui/components/DropdownChipInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { cn } from '@asyncapi/studio-utils';
type Checked = DropdownMenuCheckboxItemProps["checked"]

interface DropdownChipInputProps {
id: string;
className?: string;
chips: string[];
chipsOptions: string[];
Expand Down Expand Up @@ -70,7 +69,7 @@ export const DropdownChipInput: FunctionComponent<DropdownChipInputProps> = ({
</DropdownMenuTrigger>
<DropdownMenuContent>
{chipsOptions.map((chipOption) => (
<DropdownMenuCheckboxItem checked={chips.includes(chipOption)} onCheckedChange={() => onChipCheckedChange(chipOption)}>
<DropdownMenuCheckboxItem key={chipOption} checked={chips.includes(chipOption)} onCheckedChange={() => onChipCheckedChange(chipOption)}>
{chipOption}
</DropdownMenuCheckboxItem>
))}
Expand Down

0 comments on commit 6bf9a07

Please sign in to comment.