Skip to content

Commit 0b85fc5

Browse files
committed
Small fix check_all_controller
1 parent d93d2f1 commit 0b85fc5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
- Set default --btn-block-size --input-block-size to auto
2020
- Set .gap-half column-gap: 0.25rem
2121
- Set default cursor for accordion/button/datepicker/switch
22+
- Small fix check_all_controller
2223
- **Add sidebar_menu.css to layouts component**
2324
- **Add flash--positive and flash--negative**
2425
- **Add turbo_confirm component**

lib/generators/css_zero/add/templates/app/javascript/controllers/check_all_controller.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ export default class extends Controller {
2525
}
2626

2727
get #atLeastOneChecked() {
28-
return this.dependantTargets.some(it => it.checked)
28+
return this.hasDependantTarget && this.dependantTargets.some(it => it.checked)
2929
}
3030

3131
get #allChecked() {
32-
return this.dependantTargets.every(it => it.checked)
32+
return this.hasDependantTarget && this.dependantTargets.every(it => it.checked)
3333
}
3434
}

0 commit comments

Comments
 (0)