Skip to content

armgit / maybe

Public Imported from GitHub
0

The personal finance app for everyone

407 B
Raw Blame
import { Controller } from "@hotwired/stimulus";

// Connects to data-controller="trade-form"
export default class extends Controller {
  // Reloads the page with a new type without closing the modal
  async changeType(event) {
    const url = new URL(event.params.url, window.location.origin);
    url.searchParams.set(event.params.key, event.target.value);
    Turbo.visit(url, { frame: "modal" });
  }
}