Skip to content

Commit ab15d99

Browse files
abduraimTimur Abduraimovrobsontenorio
authored
fix: add dispatchChangeEvent call to selectAll method of Choices comp… (#871)
* fix: add dispatchChangeEvent call to selectAll method of Choices component * Also adds dispatch event for `ChoicesOffline` --------- Co-authored-by: Timur Abduraimov <[email protected]> Co-authored-by: Robson Tenório <[email protected]>
1 parent 239e9a1 commit ab15d99

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/View/Components/Choices.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ public function render(): View|Closure|string
146146
},
147147
selectAll() {
148148
this.selection = this.options.map(i => i.{{ $optionValue }})
149+
this.dispatchChangeEvent({ value: this.selection })
149150
},
150151
clear() {
151152
this.focused = false;

src/View/Components/ChoicesOffline.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ public function render(): View|Closure|string
139139
},
140140
selectAll() {
141141
this.selection = this.options.map(i => i.{{ $optionValue }})
142+
this.dispatchChangeEvent({ value: this.selection })
142143
},
143144
clear() {
144145
this.focused = false;

0 commit comments

Comments
 (0)