We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 401c412 commit 0904f99Copy full SHA for 0904f99
1 file changed
app/javascript/controllers/hide_by_source_val_controller.js
@@ -1,14 +1,14 @@
1
import { Controller } from "@hotwired/stimulus"
2
3
export default class extends Controller {
4
- static targets = ["source", "destination"]
5
- static values = {
6
- valuesToHide: Array
7
- }
8
- sourceChanged() {
9
- const val = $(this.sourceTarget).val()
10
- this.destinationTargets.forEach(
11
- destination_target => { $(destination_target).toggleClass("d-none", this.valuesToHideValue.includes(val)); }
12
- )
13
+ static targets = ["source", "destination"]
+ static values = {
+ valuesToHide: Array
+ }
+ sourceChanged() {
+ const val = $(this.sourceTarget).val()
+ this.destinationTargets.forEach(
+ destination_target => { $(destination_target).toggleClass("d-none", this.valuesToHideValue.includes(val)); }
+ )
14
}
0 commit comments