Commit a20b33a
authored
Adjusted dropdown button behavior in form_theme template (#124)
| Q | A
| --------------- | -----
| Bug fix? | yes
| New feature? | no
| BC breaks? | no/yes
| Related tickets | #120
| License | MIT
An attribute on an element that does not contain other elements, and the
script below requires that the dropdown target be contained within an
element with the toggle attribute.
```js
countErrors(element) {
const elementTarget = this.element.querySelector(element.getAttribute('data-bs-target'));
return elementTarget.querySelectorAll('.is-invalid').length +
elementTarget.querySelectorAll('.alert-danger').length;
}
```3 files changed
+3
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | 81 | | |
86 | 82 | | |
87 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
| 27 | + | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
0 commit comments