Sha256: dfcf79262c6aa212d2adeb1bb55806c437acf011dea1ad9d629f901c8c28ca25
Contents?: true
Size: 519 Bytes
Versions: 2
Compression:
Stored size: 519 Bytes
Contents
import { Controller } from "@hotwired/stimulus" // Connects to data-controller="slim-select" export default class extends Controller { connect() { console.log(`slim-select connected: ${this.element}`) self.slimSelect = new SlimSelect({ select: this.element }) this.element.setAttribute("data-action", "turbo:morph-element->slim-select#reconnect") } disconnect() { self.slimSelect.destroy() self.slimSelect = null } reconnect() { this.disconnect() this.connect() } }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
plutonium-0.16.0 | src/js/controllers/slim_select_controller.js |
plutonium-0.15.24 | src/js/controllers/slim_select_controller.js |