Change the "Add condition" button in groups to type button to avoid form submission #2233

Merged
ahatzz11 merged 1 commits from fix-add-condition-submission into main 2025-05-13 22:35:24 +08:00
ahatzz11 commented 2025-05-10 22:28:55 +08:00 (Migrated from github.com)

Right now the "Add condition" button inside a condition group is submitting the form, which causes a few weird things to happen:

  • Validation to run and fail
  • An extra condition is added

This PR ensures the button is type: button instead of type: submit to avoid this submission.

Before After

Fixes #2221

Right now the "Add condition" button inside a condition group is submitting the form, which causes a few weird things to happen: - Validation to run and fail - An extra condition is added This PR ensures the button is `type: button` instead of `type: submit` to avoid this submission. | Before | After | |-------------------------|-------------------------| ![](https://github.com/user-attachments/assets/3c947b70-92f6-4720-bfa9-841c32510dd6) | ![](https://github.com/user-attachments/assets/d7076131-71fa-4b79-bc61-0196893be3a4) Fixes #2221
zachgoll (Migrated from github.com) approved these changes 2025-05-13 22:35:16 +08:00
Sign in to join this conversation.