Replace javascript logic with hotwire. Also hide district dropdown on

home page if there is only one district.
This commit is contained in:
rebuilt 2022-12-10 14:07:58 -08:00
parent 87802c034e
commit 69179ce157
16 changed files with 3223 additions and 1259 deletions

View file

@ -0,0 +1,13 @@
import { Controller } from "@hotwired/stimulus"
import debounce from "debounce";
// Connects to data-controller="form"
export default class extends Controller {
initialize() {
this.submit = debounce(this.submit.bind(this), 300)
}
submit() {
this.element.requestSubmit();
}
}