Sha256: da9c010c9e509bb8f04dabe9967f06836e91aab7cbd58446f4404c3d2908f340
Contents?: true
Size: 415 Bytes
Versions: 2
Compression:
Stored size: 415 Bytes
Contents
import { Controller } from 'stimulus' export default class extends Controller { static targets = ["enable"]; enable() { this.enableTarget.disabled = false; } disable() { this.enableTarget.disabled = true; } change(event) { if (event.type.match(/rmp:select:.*/)) { if (event.detail.count > 0) { this.enable(); } else { this.disable() } } } }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rails_mini_profiler-0.5.0 | app/javascript/js/enable_controller.js |
rails_mini_profiler-0 | app/javascript/js/enable_controller.js |