fix: adds add button visibility condition on ListSelectionComponent (#8646)
Fixed add button appearing on composio component
This commit is contained in:
parent
5d0abf424c
commit
0ea3a50b95
1 changed files with 11 additions and 9 deletions
|
|
@ -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,14 +249,16 @@ const ListSelectionComponent = ({
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<DialogFooter>
|
<DialogFooter>
|
||||||
<Button
|
{onAddButtonClick && (
|
||||||
className="flex w-full items-center gap-2 border-t px-4 py-3 !text-mmd hover:bg-muted"
|
<Button
|
||||||
unstyled
|
className="flex w-full items-center gap-2 border-t px-4 py-3 !text-mmd hover:bg-muted"
|
||||||
onClick={onAddButtonClick}
|
unstyled
|
||||||
>
|
onClick={onAddButtonClick}
|
||||||
<ForwardedIconComponent name="Plus" className="h-4 w-4" />
|
>
|
||||||
{addButtonText}
|
<ForwardedIconComponent name="Plus" className="h-4 w-4" />
|
||||||
</Button>
|
{addButtonText}
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
</DialogFooter>
|
</DialogFooter>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue