Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(actions): pressing the property filter button submits the form #29201

Merged
merged 2 commits into from
Feb 25, 2025

Conversation

skoob13
Copy link
Contributor

@skoob13 skoob13 commented Feb 25, 2025

Problem

When you press the PropertyFilterButton in the action scene, it submits the form because HTML buttons have type=submit by default.

Changes

Set the button type to button.

Before

2025-02-25 18 18 35

After

2025-02-25 18 18 09

Does this work well for both Cloud and self-hosted?

Yes

How did you test this code?

Manual testing

@skoob13 skoob13 requested review from Twixes and a team February 25, 2025 17:40
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

Fixed an issue where PropertyFilterButton was unintentionally submitting forms due to the default HTML button type being "submit".

  • Added explicit type="button" attribute to the ButtonComponent in /frontend/src/lib/components/PropertyFilters/components/PropertyFilterButton.tsx when it renders as a button element
  • This prevents form submission when clicking property filter buttons in the action scene
  • The fix maintains all existing functionality while eliminating unexpected form submissions

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@skoob13 skoob13 enabled auto-merge (squash) February 25, 2025 17:47
Copy link
Contributor

github-actions bot commented Feb 25, 2025

Size Change: +38 B (0%)

Total Size: 9.72 MB

ℹ️ View Unchanged
Filename Size Change
frontend/dist/toolbar.js 9.72 MB +38 B (0%)

compressed-size-action

@skoob13 skoob13 merged commit d468d1c into master Feb 25, 2025
95 of 97 checks passed
@skoob13 skoob13 deleted the fix/property-filter-btn-type branch February 25, 2025 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants