fix: measure filter apply#9319
Closed
royendo wants to merge 5 commits into
Closed
Conversation
Match the explicit `onsubmit` pattern used by `AlertForm` and `BaseScheduledReportForm`. With Svelte 5 + bits-ui v2, `use:enhance` alone no longer reliably catches submit events when the form is portaled out of the document tree by `Popover.Content`. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The `Select` component in this form doesn't render a named `<input>`, so the default FormData-based submission misses `dimension` and `operation`. Validation then fails silently and `onUpdate` returns early, leaving the popover open with no visible feedback. Match the pattern used in `AlertForm` so superforms validates against the `$form` store directly. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Replace the `submitForm` Apply button + `submit()` call with a direct onClick handler that runs `validateForm` and applies the filter. The prior pattern silently failed under Svelte 5 + bits-ui v2 + portaled popover content. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Temporary instrumentation to confirm whether the Apply button is actually rendered and receiving click events. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Remove the form wrapper, `use:enhance`, and `onsubmit` handler now that the Apply button calls `submit` directly. The popover never posted to a server, so the form/enhance machinery was redundant. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
AdityaHegde
reviewed
Apr 28, 2026
| }, | ||
| ); | ||
|
|
||
| async function submit() { |
Collaborator
There was a problem hiding this comment.
Do we need this? Cant we just use the old onUpdate with dataType: "json"?
Contributor
Author
There was a problem hiding this comment.
yeah idk when i revert to 10ac1c4, it doesnt close the modal and apply; tried a few variations and the one i landed on works;
lmk if you want to take over a look at it properly
Collaborator
There was a problem hiding this comment.
This is because of nested forms with measure filter dropdown. Making sure measure filter form submits correctly instead here: #9322
That way it will also work with reports.
Contributor
Author
|
close in favor of #9322 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix bug where the alert modal for measure filter was unable to apply. Likely due to Svelte 5 upgrade
Checklist: