Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

fix combobox

Sultan6b48b336f6cd
diff --git a/apps/designer/app/designer/shared/inspector/collapsible-section.tsx b/apps/designer/app/designer/shared/inspector/collapsible-section.tsx
index 9afa375fd1..3d95b6138a 100644
--- a/apps/designer/app/designer/shared/inspector/collapsible-section.tsx
+++ b/apps/designer/app/designer/shared/inspector/collapsible-section.tsx
@@ -54,15 +54,14 @@ export const CollapsibleSection = ({
...(isOpenFinal && { paddingBottom: 0 }),
}}
>
- {isOpenFinal ? <ChevronDownIcon /> : <ChevronRightIcon />}
<Text size="1" css={{ fontWeight: "500", flexGrow: 1 }}>
{label}
</Text>
- {/* @todo: props panel shows double plus icon when rightSlot is set */}
- {rightSlot}
- <Box css={{ marginRight: -6 }}>
+ <Box css={{ marginRight: -5 }}>
{isOpenFinal ? <ChevronLeftIcon /> : <ChevronRightIcon />}
</Box>
+ {/* @todo: props panel shows double plus icon when rightSlot is set */}
+ {rightSlot}
</Flex>
</Collapsible.Trigger>
<Collapsible.Content asChild>
diff --git a/packages/design-system/src/components/combobox.tsx b/packages/design-system/src/components/combobox.tsx
index 7c2e31678b..d8f81f6123 100644
--- a/packages/design-system/src/components/combobox.tsx
+++ b/packages/design-system/src/components/combobox.tsx
@@ -135,7 +135,9 @@ export const Combobox = <Item extends BaseItem>({
value,
name,
itemToString = (item) =>
- item !== null && "label" in item ? item.label : item ?? "",
+ typeof item === "object" && item !== null && "label" in item
+ ? item.label
+ : item ?? "",
onItemSelect,
onItemHighlight,
renderTextField = (props) => <ComboboxTextField {...props} />,
diff --git a/packages/design-system/src/components/comboicon.tsx b/packages/design-system/src/components/comboicon.tsx
index cf11781ad0..2f59b8c698 100644
--- a/packages/design-system/src/components/comboicon.tsx
+++ b/packages/design-system/src/components/comboicon.tsx
@@ -1,9 +1,8 @@
import React from "react";
-import { styled } from "@stitches/react";
-import { CheckIcon } from "@radix-ui/react-icons";
+import { CheckIcon } from "@webstudio-is/icons";
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
-import type { CSS } from "@webstudio-is/react-sdk";
-import { Box } from "@webstudio-is/design-system";
+import { styled, CSS } from "../stitches.config";
+import { Box } from "./box";
const StyledContent = styled(DropdownMenuPrimitive.Content, {
maxWidth: "224px",
diff --git a/packages/design-system/src/index.ts b/packages/design-system/src/index.ts
index d9fc6e725f..48ad0f4b6e 100644
--- a/packages/design-system/src/index.ts
+++ b/packages/design-system/src/index.ts
@@ -59,3 +59,4 @@ export * from "./components/radio";
export * from "./components/combobox";
export * from "./components/checkbox";
export * from "./components/avatar";
+export * from "./components/comboicon";