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

[Frame] Merge search params instead of overwriting them #300

Open
titouanmathis opened this issue Sep 24, 2024 · 0 comments
Open

[Frame] Merge search params instead of overwriting them #300

titouanmathis opened this issue Sep 24, 2024 · 0 comments

Comments

@titouanmathis
Copy link
Contributor

When using the Frame component with a FrameForm, when the FrameForm form is submitted, the URL used to fetch the new content overwrite any predefined search params here: https://github.com/studiometa/ui/blob/develop/packages/ui/organisms/Frame/Frame.ts#L145

It might be useful to merge the generated search params from the form data with any existing one.

for (const [param, value] of new URLSearchParams(new FormData(target.$el))) {
  url.searchParams.set(param, value);
}
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

No branches or pull requests

1 participant