You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
536 B
24 lines
536 B
import { Controller } from "@hotwired/stimulus";
|
|
import debounce from "debounce";
|
|
|
|
// Connects to data-controller="analyze"
|
|
export default class extends Controller {
|
|
initialize() {
|
|
this.submit = debounce(this.submit.bind(this), 300)
|
|
}
|
|
|
|
connect() {
|
|
const collection = document.getElementsByClassName("popover");
|
|
|
|
for (let i = 0; i < collection.length; i++) {
|
|
collection[i].parentNode.removeChild(collection[i]);
|
|
}
|
|
}
|
|
|
|
submit() {
|
|
console.log("Submitting form");
|
|
|
|
this.element.requestSubmit();
|
|
}
|
|
}
|