Sha256: b2b02f87a3c9eb299b8ddd794b6a2cf8593bd9a1f280129f5970d2936b7a8168
Contents?: true
Size: 692 Bytes
Versions: 5
Compression:
Stored size: 692 Bytes
Contents
import { BridgeComponent } from "@hotwired/strada" import { BridgeElement } from "@hotwired/strada" export default class extends BridgeComponent { static component = "form" static targets = [ "submit" ] connect() { super.connect() this.notifyBridgeOfConnect() } notifyBridgeOfConnect() { const submitButton = new BridgeElement(this.submitTarget) const title = submitButton.title this.send("connect", { title }, () => { this.submitTarget.click() }) } submitStart(event) { this.submitTarget.disabled = true this.send("submitDisabled") } submitEnd(event) { this.submitTarget.disabled = false this.send("submitEnabled") } }
Version data entries
5 entries across 5 versions & 1 rubygems