From 845e11d33022bb957104e91a5b8f73e45e5bc1e0 Mon Sep 17 00:00:00 2001 From: munzzyy Date: Sun, 5 Jul 2026 16:59:18 -0500 Subject: [PATCH 1/3] fix(Button): default htmlType to button to stop accidental form submits Button and IconButton both accept an htmlType prop but never defaulted it, so the native button fell back to the browser default of type=submit. Any Button or IconButton inside a form submitted that form on click unless htmlType was set explicitly. Default htmlType to 'button' on both components. Consumers who want submit behavior still opt in with htmlType="submit". Closes #1092 --- .changeset/fix-button-htmltype-default.md | 5 +++++ src/components/Button/Button.test.tsx | 17 ++++++++++++++++- src/components/Button/Button.tsx | 2 +- src/components/IconButton/IconButton.test.tsx | 17 ++++++++++++++++- src/components/IconButton/IconButton.tsx | 2 +- 5 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 .changeset/fix-button-htmltype-default.md diff --git a/.changeset/fix-button-htmltype-default.md b/.changeset/fix-button-htmltype-default.md new file mode 100644 index 000000000..e6696f930 --- /dev/null +++ b/.changeset/fix-button-htmltype-default.md @@ -0,0 +1,5 @@ +--- +'@clickhouse/click-ui': patch +--- + +Default `htmlType` to `"button"` on `Button` and `IconButton`. Both components already accepted an `htmlType` prop, but left it undefined by default, so the native `