Skip to content

Commit

Permalink
Merge pull request #19 from Coaktion/feat/addin-limit-tags-muliple-au…
Browse files Browse the repository at this point in the history
…tocomplete

feat: adding limitTagsProps
  • Loading branch information
MatheusDev20 authored Apr 3, 2024
2 parents d55a278 + ed4ad5b commit 41349a5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/auto-complete-multiple.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ interface AktAutoCompleteMultipleProps {
rows: any[];
value?: any;
title?: string;
limitTags?: number;
iconColor?: string;
onChange: (data: any) => void;
}
Expand All @@ -30,6 +31,7 @@ const AktAutoCompleteMultiple: React.FC<AktAutoCompleteMultipleProps> = ({
value,
title,
iconColor = '#6b6b6b',
limitTags,
onChange
}: AktAutoCompleteMultipleProps) => {
const [isOpen, setIsOpen] = useState(false);
Expand All @@ -44,6 +46,7 @@ const AktAutoCompleteMultiple: React.FC<AktAutoCompleteMultipleProps> = ({
<Autocomplete
multiple
open={isOpen}
limitTags={limitTags || -1}
title={title}
onBlur={() => setIsOpen(false)}
options={rows}
Expand Down

0 comments on commit 41349a5

Please sign in to comment.