mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-09 15:38:21 -07:00
Replace javascript logic with hotwire. Also hide district dropdown on
home page if there is only one district.
This commit is contained in:
parent
87802c034e
commit
69179ce157
16 changed files with 3223 additions and 1259 deletions
13
app/javascript/controllers/form_controller.js
Normal file
13
app/javascript/controllers/form_controller.js
Normal 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();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue