fix: adds add button visibility condition on ListSelectionComponent (#8646)

Fixed add button appearing on composio component
This commit is contained in:
Lucas Oliveira 2025-06-20 12:14:08 -03:00 • committed by GitHub
commit 0ea3a50b95
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -212,7 +212,7 @@ const ListSelectionComponent = ({
<div <div
ref={listContainerRef} ref={listContainerRef}
className="flex w-full flex-col gap-1 overflow-y-auto px-3 pb-3" className="flex w-full flex-col gap-1 overflow-y-auto px-3"
> >
{filteredList.length > 0 ? ( {filteredList.length > 0 ? (
filteredList.map((item, index) => ( filteredList.map((item, index) => (
@ -249,6 +249,7 @@ const ListSelectionComponent = ({
)} )}
</div> </div>
<DialogFooter> <DialogFooter>
{onAddButtonClick && (
<Button <Button
className="flex w-full items-center gap-2 border-t px-4 py-3 !text-mmd hover:bg-muted" className="flex w-full items-center gap-2 border-t px-4 py-3 !text-mmd hover:bg-muted"
unstyled unstyled
@ -257,6 +258,7 @@ const ListSelectionComponent = ({
<ForwardedIconComponent name="Plus" className="h-4 w-4" /> <ForwardedIconComponent name="Plus" className="h-4 w-4" />
{addButtonText} {addButtonText}
</Button> </Button>
)}
</DialogFooter> </DialogFooter>
</DialogContent> </DialogContent>
</Dialog> </Dialog>