diff --git a/.cursor/rules/studio/forms/RULE.md b/.cursor/rules/studio/forms/RULE.md index b9b729111b5..74f8383f862 100644 --- a/.cursor/rules/studio/forms/RULE.md +++ b/.cursor/rules/studio/forms/RULE.md @@ -1,5 +1,5 @@ --- -description: "Studio: form patterns (page layouts + side panels) and react-hook-form conventions" +description: 'Studio: form patterns (page layouts + side panels) and react-hook-form conventions' globs: - apps/studio/**/*.{ts,tsx} alwaysApply: false @@ -29,7 +29,6 @@ Use the Design System UI pattern docs as the source of truth: ## Actions and state -- Handle dirty state (`form.formState.isDirty`) to show Cancel and to disable Save. +- Handle dirty state by destructuring `isDirty` from `formState` (`const { isDirty } = form.formState`) then use it to show Cancel and to disable Save. - Show loading on submit buttons via `loading`. - When submit button is outside the `