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.

fix: don't show unsaved changes modal if we autofocus and don't change anything

Brad Barbind031b5ab8f6d
diff --git a/packages/form/src/internal/getInputProps.ts b/packages/form/src/internal/getInputProps.ts
index b433801463..63b31bfa05 100644
--- a/packages/form/src/internal/getInputProps.ts
+++ b/packages/form/src/internal/getInputProps.ts
@@ -70,11 +70,12 @@ export const createGetInputProps = ({
onChange: (...args: unknown[]) => {
if (behavior === "onChange") validate();
else clearError();
+ setTouched(true);
return props?.onChange?.(...args);
},
onBlur: (...args: unknown[]) => {
if (behavior === "onBlur") validate();
- setTouched(true);
+
return props?.onBlur?.(...args);
},
name,
diff --git a/packages/react/src/Menubar.tsx b/packages/react/src/Menubar.tsx
index 877f3ec02c..a00ed5b737 100644
--- a/packages/react/src/Menubar.tsx
+++ b/packages/react/src/Menubar.tsx
@@ -10,7 +10,7 @@ const Menubar = forwardRef<HTMLDivElement, ComponentProps<"div">>(
<div
{...props}
className={cn(
- "min-h-[2.5rem] flex items-center bg-card border border-border dark:border-0 dark:shadow-[0px_1px_0px_0px_hsla(0,0%,100%,.03)_inset,0px_0px_0px_1px_hsla(0,0%,100%,.03)_inset,0px_0px_0px_1px_rgba(0,0,0,.1),0px_2px_2px_0px_rgba(0,0,0,.1),0px_4px_4px_0px_rgba(0,0,0,.1),0px_8px_8px_0px_rgba(0,0,0,.1)] rounded-lg justify-start p-1 w-full space-x-1 overflow-x-scroll scrollbar-hide",
+ "min-h-[2.5rem] flex items-center bg-card border border-border dark:border-0 dark:shadow-[0px_1px_0px_0px_hsla(0,0%,100%,.03)_inset,0px_0px_0px_1px_hsla(0,0%,100%,.03)_inset,0px_0px_0px_1px_rgba(0,0,0,.1),0px_2px_2px_0px_rgba(0,0,0,.1),0px_4px_4px_0px_rgba(0,0,0,.1),0px_8px_8px_0px_rgba(0,0,0,.1)] rounded-lg justify-start p-1 w-full space-x-1 scrollbar-hide",
className
)}
>