The Open Standard for Generative UI
Render thread options dropdown in Portal (#127)
abhithesys8a0181c4cc08
diff --git a/js/packages/react-ui/package.json b/js/packages/react-ui/package.jsonindex cafe8c00d..91376dc9f 100644--- a/js/packages/react-ui/package.json+++ b/js/packages/react-ui/package.json@@ -2,7 +2,7 @@"type": "module","name": "@crayonai/react-ui","license": "MIT",- "version": "0.7.8",+ "version": "0.7.9","description": "Component library for Generative UI SDK","main": "dist/index.js","types": "dist/index.d.ts",diff --git a/js/packages/react-ui/src/components/Shell/ThreadList.tsx b/js/packages/react-ui/src/components/Shell/ThreadList.tsxindex 0a9f7fb35..e31a5eddd 100644--- a/js/packages/react-ui/src/components/Shell/ThreadList.tsx+++ b/js/packages/react-ui/src/components/Shell/ThreadList.tsx@@ -44,28 +44,33 @@ export const ThreadButton = ({>{title}</button>- <DropdownMenu.Root modal={false}>+ <DropdownMenu.Root><DropdownMenu.Trigger asChild><button className="crayon-shell-thread-button-dropdown-trigger"><EllipsisVerticalIcon size={14} /></button></DropdownMenu.Trigger>- <DropdownMenu.Content- className="crayon-shell-thread-button-dropdown-menu"- side="bottom"- align="start"- sideOffset={2}- >- <DropdownMenu.Item- className="crayon-shell-thread-button-dropdown-menu-item"- onSelect={() => {- deleteThread(id);- }}+ <DropdownMenu.Portal>+ <DropdownMenu.Content+ className="crayon-shell-thread-button-dropdown-menu"+ side="bottom"+ align="start"+ sideOffset={2}>- <Trash2Icon size={14} className="crayon-shell-thread-button-dropdown-menu-item-icon" />- Delete- </DropdownMenu.Item>- </DropdownMenu.Content>+ <DropdownMenu.Item+ className="crayon-shell-thread-button-dropdown-menu-item"+ onSelect={() => {+ deleteThread(id);+ }}+ >+ <Trash2Icon+ size={14}+ className="crayon-shell-thread-button-dropdown-menu-item-icon"+ />+ Delete+ </DropdownMenu.Item>+ </DropdownMenu.Content>+ </DropdownMenu.Portal></DropdownMenu.Root></div>);