Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

feat: add quantity to dispositions

Brad Barbin71419c73abe7
diff --git a/apps/erp/app/components/Layout/Topbar/CompanySwitcher.tsx b/apps/erp/app/components/Layout/Topbar/CompanySwitcher.tsx
index 7df8ada44b..143e22c44b 100644
--- a/apps/erp/app/components/Layout/Topbar/CompanySwitcher.tsx
+++ b/apps/erp/app/components/Layout/Topbar/CompanySwitcher.tsx
@@ -5,8 +5,8 @@ import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuGroup,
- DropdownMenuItem,
DropdownMenuIcon,
+ DropdownMenuItem,
DropdownMenuLabel,
DropdownMenuSeparator,
DropdownMenuTrigger,
@@ -84,7 +84,7 @@ const CompanySwitcher = () => {
</DropdownMenuTrigger>
<DropdownMenuContent align="end" className="min-w-[240px]">
<DropdownMenuItem asChild>
- <Link to={path.to.dashboard}>
+ <Link to={path.to.authenticatedRoot}>
<DropdownMenuIcon icon={<LuHouse />} />
Dashboard
</Link>
diff --git a/apps/erp/app/modules/quality/quality.models.ts b/apps/erp/app/modules/quality/quality.models.ts
index 6188088636..ba9309788a 100644
--- a/apps/erp/app/modules/quality/quality.models.ts
+++ b/apps/erp/app/modules/quality/quality.models.ts
@@ -125,6 +125,7 @@ export const issueAssociationValidator = z
type: z.enum(nonConformanceAssociationType),
id: z.string(),
lineId: zfd.text(z.string().optional()),
+ quantity: zfd.numeric(z.number().min(0).optional()),
})
.refine(
(data) => {
@@ -207,6 +208,10 @@ export const issueWorkflowValidator = z.object({
.optional(),
});
+export const itemQuantityValidator = z.object({
+ quantity: zfd.numeric(z.number().min(0)),
+});
+
export const qualityDocumentValidator = z.object({
id: zfd.text(z.string().optional()),
name: z.string().min(1, { message: "Name is required" }),
diff --git a/apps/erp/app/modules/quality/quality.service.ts b/apps/erp/app/modules/quality/quality.service.ts
index 21b3ca4fef..4df3ecde0d 100644
--- a/apps/erp/app/modules/quality/quality.service.ts
+++ b/apps/erp/app/modules/quality/quality.service.ts
@@ -390,7 +390,7 @@ export async function getIssueInvestigationTasks(
) {
let query = client
.from("nonConformanceInvestigationTask")
- .select("*, ...nonConformanceInvestigationType(name)")
+ .select("*, ...nonConformanceInvestigationType(name), supplier(name)")
.eq("nonConformanceId", id)
.eq("companyId", companyId);
@@ -409,7 +409,7 @@ export async function getIssueActionTasks(
let query = client
.from("nonConformanceActionTask")
.select(
- "*, ...nonConformanceRequiredAction(name), nonConformanceActionProcess(processId, ...process(name))"
+ "*, ...nonConformanceRequiredAction(name), nonConformanceActionProcess(processId, ...process(name)), supplier(name)"
)
.eq("nonConformanceId", id)
.eq("companyId", companyId);
@@ -470,6 +470,8 @@ export async function getIssueAssociations(
id,
itemId,
disposition,
+ quantity,
+ createdAt,
...item(
readableIdWithRevision
)
@@ -607,6 +609,8 @@ export async function getIssueAssociations(
documentReadableId: item.readableIdWithRevision || "",
documentLineId: "",
disposition: item.disposition,
+ quantity: item.quantity,
+ createdAt: item.createdAt,
})) || [],
jobOperations:
jobOperations.data?.map((item) => ({
@@ -1384,7 +1388,7 @@ export async function upsertIssue(
if (salesOrderLineId) {
const salesOrderLine = await client
.from("salesOrderLine")
- .select("*")
+ .select("*, salesOrder(salesOrderId)")
.eq("id", salesOrderLineId)
.single();
if (salesOrderLine.data) {
@@ -1396,6 +1400,8 @@ export async function upsertIssue(
createdBy: nonConformance.createdBy,
salesOrderLineId: salesOrderLineId,
salesOrderId: salesOrderLine.data.salesOrderId,
+ salesOrderReadableId:
+ salesOrderLine.data.salesOrder.salesOrderId,
nonConformanceId: result.data.id,
},
]);
diff --git a/apps/erp/app/modules/quality/types.ts b/apps/erp/app/modules/quality/types.ts
index 77a93ee869..8ba97bd80f 100644
--- a/apps/erp/app/modules/quality/types.ts
+++ b/apps/erp/app/modules/quality/types.ts
@@ -48,6 +48,7 @@ export type IssueAssociationNode = {
documentReadableId: string;
documentLineId: string;
type: string;
+ quantity?: number;
}[];
};
diff --git a/apps/erp/app/modules/quality/ui/Issue/AssociatedItemsList.tsx b/apps/erp/app/modules/quality/ui/Issue/AssociatedItemsList.tsx
index 7f6e9e8bbc..0edb433f0c 100644
--- a/apps/erp/app/modules/quality/ui/Issue/AssociatedItemsList.tsx
+++ b/apps/erp/app/modules/quality/ui/Issue/AssociatedItemsList.tsx
@@ -1,4 +1,4 @@
-import { Select, ValidatedForm } from "@carbon/form";
+import { Number, Select, ValidatedForm } from "@carbon/form";
import { Card, CardContent, CardHeader, CardTitle, toast } from "@carbon/react";
import { useFetcher } from "@remix-run/react";
import { useCallback, useEffect } from "react";
@@ -7,7 +7,7 @@ import { usePermissions } from "~/hooks";
import type { action } from "~/routes/x+/issue+/item+/update";
import { useItems } from "~/stores";
import { path } from "~/utils/path";
-import { disposition } from "../../quality.models";
+import { disposition, itemQuantityValidator } from "../../quality.models";
import type { IssueAssociationNode } from "../../types";
import { DispositionStatus } from "./DispositionStatus";
@@ -43,6 +43,21 @@ export function AssociatedItemsList({
[fetcher]
);
+ const onUpdateQuantity = useCallback(
+ (nonConformanceItemId: string, quantityValue: number | null) => {
+ const formData = new FormData();
+ formData.append("id", nonConformanceItemId);
+ formData.append("field", "quantity");
+ formData.append("value", quantityValue?.toString() ?? "0");
+
+ fetcher.submit(formData, {
+ method: "post",
+ action: path.to.updateIssueItem,
+ });
+ },
+ [fetcher]
+ );
+
if (!associatedItems || associatedItems.length === 0) {
return null;
}
@@ -55,60 +70,88 @@ export function AssociatedItemsList({
</CardTitle>
</CardHeader>
<CardContent>
- <ul className="flex flex-col">
- {associatedItems.map((child) => {
- // Resolve item information from the items store using documentId
- const item = items.find((i) => i.id === child.documentId);
+ <ul className="flex flex-col gap-3">
+ {associatedItems
+ .sort((a, b) => (a.createdAt ?? 0) - (b.createdAt ?? 0))
+ .map((child) => {
+ // Resolve item information from the items store using documentId
+ const item = items.find((i) => i.id === child.documentId);
- if (!item) return null;
+ if (!item) return null;
- return (
- <li
- key={child.id}
- className="bg-muted/30 border border-border rounded-lg w-full px-6 py-4"
- >
- <div className="flex items-center justify-between w-full gap-4">
- <div className="flex flex-col flex-1">
- <div className="flex items-center gap-2">
- <h3 className="font-semibold truncate">
- {item.readableIdWithRevision}
- </h3>
+ return (
+ <li
+ key={child.id}
+ className="bg-muted/30 border border-border rounded-lg w-full px-6 py-4"
+ >
+ <div className="flex items-center justify-between w-full gap-4">
+ <div className="flex flex-col flex-1">
+ <div className="flex items-center gap-2">
+ <h3 className="font-semibold truncate">
+ {item.readableIdWithRevision}
+ </h3>
+ </div>
+ <span className="text-xs text-muted-foreground">
+ {item.name}
+ </span>
+ </div>
+ <div className="flex items-end gap-2 flex-shrink-0">
+ <ValidatedForm
+ defaultValues={{
+ quantity: (child as any).quantity ?? 0,
+ }}
+ validator={itemQuantityValidator}
+ className="w-24"
+ >
+ <Number
+ label="Quantity"
+ name="quantity"
+ isReadOnly={!permissions.can("update", "quality")}
+ minValue={0}
+ size="sm"
+ onBlur={(e) => {
+ const target = e.target as HTMLInputElement;
+ const numValue = parseFloat(target.value) || 0;
+ onUpdateQuantity(child.id, numValue);
+ }}
+ />
+ </ValidatedForm>
+ <ValidatedForm
+ defaultValues={{
+ disposition: (child as any).disposition ?? "Pending",
+ }}
+ validator={z.object({
+ disposition: z.string().optional(),
+ })}
+ className="flex-shrink-0 items-center"
+ >
+ <Select
+ options={disposition.map((d) => ({
+ value: d,
+ label: <DispositionStatus disposition={d} />,
+ }))}
+ isReadOnly={!permissions.can("update", "quality")}
+ label="Status"
+ name="disposition"
+ inline={(value) => {
+ return (
+ <div className="h-8 flex items-center">
+ <DispositionStatus disposition={value} />
+ </div>
+ );
+ }}
+ onChange={(value) => {
+ if (value) {
+ onUpdateDisposition(child.id, value.value);
+ }
+ }}
+ />
+ </ValidatedForm>
</div>
- <span className="text-xs text-muted-foreground">
- {item.name}
- </span>
</div>
- <ValidatedForm
- defaultValues={{
- disposition: (child as any).disposition ?? "Pending",
- }}
- validator={z.object({
- disposition: z.string().optional(),
- })}
- className="flex-shrink-0"
- >
- <Select
- options={disposition.map((d) => ({
- value: d,
- label: <DispositionStatus disposition={d} />,
- }))}
- isReadOnly={!permissions.can("update", "quality")}
- label=""
- name="disposition"
- inline={(value) => {
- return <DispositionStatus disposition={value} />;
- }}
- onChange={(value) => {
- if (value) {
- onUpdateDisposition(child.id, value.value);
- }
- }}
- />
- </ValidatedForm>
- </div>
- </li>
- );
- })}
+ </li>
+ );
+ })}
</ul>
</CardContent>
</Card>
diff --git a/apps/erp/app/modules/quality/ui/Issue/IssueAssociations.tsx b/apps/erp/app/modules/quality/ui/Issue/IssueAssociations.tsx
index d83afd0c31..df32d583be 100644
--- a/apps/erp/app/modules/quality/ui/Issue/IssueAssociations.tsx
+++ b/apps/erp/app/modules/quality/ui/Issue/IssueAssociations.tsx
@@ -1,5 +1,5 @@
import { useCarbon } from "@carbon/auth";
-import { Combobox, Hidden, Submit, ValidatedForm } from "@carbon/form";
+import { Combobox, Hidden, Number, Submit, ValidatedForm } from "@carbon/form";
import {
Button,
cn,
@@ -238,8 +238,17 @@ export function IssueAssociationItem({
className="flex pr-7 h-8 cursor-pointer items-center overflow-hidden rounded-sm px-1 gap-2 text-sm hover:bg-muted/90 w-full font-medium whitespace-nowrap"
>
<LevelLine isSelected={false} />
- {getAssociationIcon(node.key)}
- <span className="truncate">{child.documentReadableId}</span>
+ <div className="flex flex-grow justify-between gap-2">
+ <div className="flex items-center gap-2">
+ {getAssociationIcon(node.key)}
+ <span className="truncate">
+ {child.documentReadableId}
+ </span>
+ </div>
+ {node.key === "items" && (
+ <Count count={child.quantity ?? 0} />
+ )}
+ </div>
</Link>
{permissions.can("delete", node.module) && (
<DropdownMenu>
@@ -323,6 +332,7 @@ function NewItemAssociation() {
type={itemType}
onTypeChange={onTypeChange}
/>
+ <Number name="quantity" label="Quantity" minValue={0} defaultValue={0} />
</>
);
}
diff --git a/apps/erp/app/routes/file+/issue+/$id[.]pdf.tsx b/apps/erp/app/routes/file+/issue+/$id[.]pdf.tsx
index ea069a553a..40da75dcd7 100644
--- a/apps/erp/app/routes/file+/issue+/$id[.]pdf.tsx
+++ b/apps/erp/app/routes/file+/issue+/$id[.]pdf.tsx
@@ -8,6 +8,7 @@ import {
getIssueActionTasks,
getIssueApprovalTasks,
getIssueInvestigationTasks,
+ getIssueItems,
getIssueReviewers,
getIssueTypes,
getRequiredActionsList,
@@ -33,6 +34,7 @@ export async function loader({ request, params }: LoaderFunctionArgs) {
reviewers,
investigationTypes,
actionTypes,
+ items,
] = await Promise.all([
getCompany(client, companyId),
getIssue(client, id),
@@ -43,6 +45,7 @@ export async function loader({ request, params }: LoaderFunctionArgs) {
getIssueReviewers(client, id, companyId),
getInvestigationTypesList(client, companyId),
getRequiredActionsList(client, companyId),
+ getIssueItems(client, id, companyId),
]);
if (company.error) {
@@ -69,13 +72,18 @@ export async function loader({ request, params }: LoaderFunctionArgs) {
console.error(approvalTasks.error);
}
+ if (items.error) {
+ console.error(items.error);
+ }
+
if (
company.error ||
nonConformance.error ||
nonConformanceTypes.error ||
investigationTasks.error ||
actionTasks.error ||
- approvalTasks.error
+ approvalTasks.error ||
+ items.error
) {
throw new Error("Failed to load issue");
}
@@ -93,6 +101,7 @@ export async function loader({ request, params }: LoaderFunctionArgs) {
actionTasks={actionTasks.data ?? []}
actionTypes={actionTypes.data ?? []}
reviewers={reviewers.data ?? []}
+ items={items.data ?? []}
/>
);
diff --git a/apps/erp/app/routes/x+/issue+/$id.association.new.tsx b/apps/erp/app/routes/x+/issue+/$id.association.new.tsx
index e538e615e0..39ba0d24a9 100644
--- a/apps/erp/app/routes/x+/issue+/$id.association.new.tsx
+++ b/apps/erp/app/routes/x+/issue+/$id.association.new.tsx
@@ -26,7 +26,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
});
}
- const { type, id, lineId } = validation.data;
+ const { type, id, lineId, quantity } = validation.data;
switch (type) {
case "items":
@@ -37,9 +37,11 @@ export async function action({ request, params }: ActionFunctionArgs) {
nonConformanceId,
createdBy: userId,
companyId: companyId,
+ quantity: quantity ?? 0,
});
if (itemError) {
+ console.error(itemError);
return json({
success: false,
message: "Failed to create issue item",
@@ -58,6 +60,7 @@ export async function action({ request, params }: ActionFunctionArgs) {
});
if (customerError) {
+ console.error(customerError);
return json({
success: false,
message: "Failed to create issue customer",
diff --git a/apps/erp/app/routes/x+/issue+/item+/update.tsx b/apps/erp/app/routes/x+/issue+/item+/update.tsx
index 852382d284..0cad96e4d5 100644
--- a/apps/erp/app/routes/x+/issue+/item+/update.tsx
+++ b/apps/erp/app/routes/x+/issue+/item+/update.tsx
@@ -47,6 +47,24 @@ export async function action({ request }: ActionFunctionArgs) {
})
.eq("id", id)
);
+ case "quantity":
+ const quantity = parseFloat(value || "0");
+ if (isNaN(quantity) || quantity < 0) {
+ return json({
+ error: { message: "Invalid quantity" },
+ data: null,
+ });
+ }
+ return json(
+ await client
+ .from("nonConformanceItem")
+ .update({
+ quantity,
+ updatedBy: userId,
+ updatedAt: new Date().toISOString(),
+ })
+ .eq("id", id)
+ );
default:
return json({
error: { message: `Invalid field: ${field}` },
diff --git a/packages/database/supabase/migrations/20251118004438_disposition-quantity.sql b/packages/database/supabase/migrations/20251118004438_disposition-quantity.sql
new file mode 100644
index 0000000000..e473bc4812
--- /dev/null
+++ b/packages/database/supabase/migrations/20251118004438_disposition-quantity.sql
@@ -0,0 +1,2 @@
+ALTER TABLE "nonConformanceItem" ADD COLUMN "quantity" NUMERIC NOT NULL DEFAULT 0;
+ALTER TABLE "nonConformanceItem" DROP CONSTRAINT "nonConformanceItem_unique";
\ No newline at end of file
diff --git a/packages/documents/src/pdf/IssuePDF.tsx b/packages/documents/src/pdf/IssuePDF.tsx
index 534388492a..160f605fd5 100644
--- a/packages/documents/src/pdf/IssuePDF.tsx
+++ b/packages/documents/src/pdf/IssuePDF.tsx
@@ -11,14 +11,29 @@ type ListItem = {
name: string;
};
+type IssueItem = Database["public"]["Tables"]["nonConformanceItem"]["Row"] & {
+ name: string | null;
+};
+
+type InvestigationTask =
+ Database["public"]["Tables"]["nonConformanceInvestigationTask"]["Row"] & {
+ supplier: { name: string } | null;
+ };
+
+type ActionTask =
+ Database["public"]["Tables"]["nonConformanceActionTask"]["Row"] & {
+ supplier: { name: string } | null;
+ };
+
interface IssuePDFProps extends PDF {
nonConformance: Database["public"]["Tables"]["nonConformance"]["Row"];
nonConformanceTypes: Database["public"]["Tables"]["nonConformanceType"]["Row"][];
- investigationTasks: Database["public"]["Tables"]["nonConformanceInvestigationTask"]["Row"][];
+ investigationTasks: InvestigationTask[];
investigationTypes: ListItem[];
- actionTasks: Database["public"]["Tables"]["nonConformanceActionTask"]["Row"][];
+ actionTasks: ActionTask[];
actionTypes: ListItem[];
reviewers: Database["public"]["Tables"]["nonConformanceReviewer"]["Row"][];
+ items: IssueItem[];
}
// Initialize tailwind-styled-components
@@ -48,6 +63,7 @@ const IssuePDF = ({
actionTasks,
actionTypes,
reviewers,
+ items,
title = "Issue Report",
}: IssuePDFProps) => {
return (
@@ -88,6 +104,11 @@ const IssuePDF = ({
},
]}
/>
+ <View style={tw("flex flex-col gap-2 mb-10")}>
+ <View style={tw("flex flex-row justify-between")}>
+ <Text style={tw("font-bold")}>{nonConformance.name}</Text>
+ </View>
+ </View>
{Object.keys(nonConformance.content ?? {}).length > 0 && (
<View
style={tw("flex flex-col gap-2 border-b border-gray-300 mb-10")}
@@ -99,8 +120,29 @@ const IssuePDF = ({
<Note content={nonConformance.content as JSONContent} />
</View>
)}
+ {items.length > 0 && (
+ <View style={tw("mb-10")} wrap={false}>
+ <Text style={tw("font-bold mb-2")}>Dispositions</Text>
+ {items.map((item) => (
+ <View
+ key={item.id}
+ style={tw("flex flex-col gap-1 py-2 border-b border-gray-300")}
+ >
+ <View style={tw("flex flex-row justify-between")}>
+ <Text style={tw("font-bold text-sm")}>{item.name}</Text>
+ <Badge>{item.disposition ?? "Pending"}</Badge>
+ </View>
+ {item.quantity > 0 && (
+ <Text style={tw("text-sm text-gray-500")}>
+ Quantity: {item.quantity}
+ </Text>
+ )}
+ </View>
+ ))}
+ </View>
+ )}
{investigationTasks.length > 0 && (
- <View style={tw("mb-10")}>
+ <View style={tw("mb-10")} wrap={false}>
{investigationTasks.map((task) => (
<View
key={task.id}
@@ -115,6 +157,11 @@ const IssuePDF = ({
}
</Text>
</View>
+ {task.supplier?.name && (
+ <View style={tw("flex flex-row items-center gap-2")}>
+ <Badge>{task.supplier.name}</Badge>
+ </View>
+ )}
{task.completedDate && (
<Text style={tw("text-sm")}>
Completed: {task.completedDate}
@@ -129,7 +176,7 @@ const IssuePDF = ({
)}
{actionTasks.length > 0 && (
- <View style={tw("mb-10")}>
+ <View style={tw("mb-10")} wrap={false}>
{actionTasks.map((task) => (
<View
key={task.id}
@@ -143,6 +190,11 @@ const IssuePDF = ({
}
</Text>
</View>
+ {task.supplier?.name && (
+ <View style={tw("flex flex-row items-center gap-2")}>
+ <Badge>{task.supplier.name}</Badge>
+ </View>
+ )}
{task.completedDate && (
<Text style={tw("text-sm")}>
Completed: {task.completedDate}
@@ -157,7 +209,7 @@ const IssuePDF = ({
)}
{reviewers.length > 0 && (
- <View style={tw("mb-5")}>
+ <View style={tw("mb-5")} wrap={false}>
<Text style={tw("font-bold mb-2")}>Reviewers</Text>
{reviewers.map((reviewer) => (
<View
@@ -184,3 +236,13 @@ const IssuePDF = ({
};
export default IssuePDF;
+
+function Badge({ children }: { children: React.ReactNode }) {
+ return (
+ <Text
+ style={tw("text-xs bg-gray-100 px-2 py-1 rounded border border-gray-300")}
+ >
+ {children}
+ </Text>
+ );
+}
diff --git a/packages/form/src/components/DatePicker.tsx b/packages/form/src/components/DatePicker.tsx
index 77b181e482..54bb2604ae 100644
--- a/packages/form/src/components/DatePicker.tsx
+++ b/packages/form/src/components/DatePicker.tsx
@@ -72,7 +72,9 @@ const DatePicker = ({
const utcValue = date ? date.toString() : "";
const DatePickerPreview = (
- <span className="flex-grow line-clamp-1">{formatDate(utcValue)}</span>
+ <span className="flex flex-grow line-clamp-1 items-center">
+ {formatDate(utcValue)}
+ </span>
);
return (
diff --git a/packages/form/src/components/Number.tsx b/packages/form/src/components/Number.tsx
index 2cd1b4d5eb..9159691756 100644
--- a/packages/form/src/components/Number.tsx
+++ b/packages/form/src/components/Number.tsx
@@ -18,6 +18,7 @@ import { useField } from "../hooks";
type FormNumberProps = NumberFieldProps & {
name: string;
+ size?: "sm" | "md" | "lg";
label?: string;
isConfigured?: boolean;
isRequired?: boolean;
@@ -29,6 +30,7 @@ const Number = forwardRef<HTMLInputElement, FormNumberProps>(
(
{
name,
+ size = "md",
label,
isConfigured = false,
isRequired,
@@ -66,8 +68,8 @@ const Number = forwardRef<HTMLInputElement, FormNumberProps>(
formatOptions={formatOptions}
>
<NumberInputGroup className="relative">
- <NumberInput isReadOnly={isReadOnly} ref={ref} />
- {!isReadOnly && (
+ <NumberInput isReadOnly={isReadOnly} ref={ref} size={size} />
+ {!isReadOnly && size !== "sm" && (
<NumberInputStepper>
<NumberIncrementStepper>
<LuChevronUp size="1em" strokeWidth="3" />
diff --git a/packages/form/src/components/NumberControlled.tsx b/packages/form/src/components/NumberControlled.tsx
index a09350097e..1ab108473d 100644
--- a/packages/form/src/components/NumberControlled.tsx
+++ b/packages/form/src/components/NumberControlled.tsx
@@ -84,7 +84,9 @@ const Number = forwardRef<HTMLInputElement, FormNumberProps>(
)}
<HStack spacing={0} className="w-full justify-between">
{value !== undefined && (
- <span className="flex-grow line-clamp-1">{value}</span>
+ <span className="flex flex-grow line-clamp-1 items-center">
+ {value}
+ </span>
)}
<IconButton
icon={
diff --git a/packages/form/src/components/Select.tsx b/packages/form/src/components/Select.tsx
index 0402f98eb9..fee376d24e 100644
--- a/packages/form/src/components/Select.tsx
+++ b/packages/form/src/components/Select.tsx
@@ -147,7 +147,7 @@ export const SelectBase = forwardRef<HTMLButtonElement, SelectBaseProps>(
return (
<HStack spacing={1}>
{isInlinePreview && value && (
- <span className="flex-grow line-clamp-1">
+ <span className="flex flex-grow line-clamp-1 items-center">
{inline(value, options)}
</span>
)}
diff --git a/packages/react/src/Combobox.tsx b/packages/react/src/Combobox.tsx
index 1603266394..ee86b6bac4 100644
--- a/packages/react/src/Combobox.tsx
+++ b/packages/react/src/Combobox.tsx
@@ -67,7 +67,7 @@ const Combobox = forwardRef<HTMLButtonElement, ComboboxProps>(
spacing={isInlinePreview ? 2 : 1}
>
{isInlinePreview && value && (
- <span className="flex-grow line-clamp-1">
+ <span className="flex flex-grow line-clamp-1 items-center">
{inline(value, options)}
</span>
)}
diff --git a/packages/react/src/CreateableCombobox.tsx b/packages/react/src/CreateableCombobox.tsx
index 63969a022f..c307f7ae56 100644
--- a/packages/react/src/CreateableCombobox.tsx
+++ b/packages/react/src/CreateableCombobox.tsx
@@ -71,7 +71,7 @@ const CreatableCombobox = forwardRef<HTMLButtonElement, CreatableComboboxProps>(
spacing={1}
>
{isInlinePreview && value && (
- <span className="flex-grow line-clamp-1">
+ <span className="flex flex-grow line-clamp-1 items-center">
{inline(value, options)}
</span>
)}
diff --git a/packages/react/src/CreateableMultiSelect.tsx b/packages/react/src/CreateableMultiSelect.tsx
index e0d36acdca..bd07c9f804 100644
--- a/packages/react/src/CreateableMultiSelect.tsx
+++ b/packages/react/src/CreateableMultiSelect.tsx
@@ -94,7 +94,7 @@ const CreatableMultiSelect = forwardRef<
>
{isInlinePreview && Array.isArray(value) && value.length > 0 && (
<span
- className="flex-grow line-clamp-1 cursor-pointer"
+ className="flex flex-grow line-clamp-1 items-center cursor-pointer"
onClick={() => setOpen(true)}
>
{inline(value, options, maxPreview)}
diff --git a/packages/react/src/MultiSelect.tsx b/packages/react/src/MultiSelect.tsx
index ee694e8ae1..c5598cc45e 100644
--- a/packages/react/src/MultiSelect.tsx
+++ b/packages/react/src/MultiSelect.tsx
@@ -84,7 +84,7 @@ const MultiSelect = forwardRef<HTMLButtonElement, MultiSelectProps>(
{isInlinePreview && Array.isArray(value) && value.length > 0 && (
<span
className={cn(
- "flex-grow line-clamp-1 cursor-pointer",
+ "flex flex-grow line-clamp-1 items-center cursor-pointer",
isReadOnly && "cursor-default opacity-50"
)}
onClick={isReadOnly ? undefined : () => setOpen(true)}