Skip to content

Commit 6dea445

Browse files
committed
clears case selection on modal close
1 parent c11158d commit 6dea445

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/javascript/src/casa_case.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ function handleModalClose() {
156156
if (!selectEl) return
157157

158158
clearSelectErrors()
159-
// TODO: clear selected case as well?
159+
// this line taken from docs https://select2.org/programmatic-control/add-select-clear-items
160+
$('#case-selection').val(null).trigger('change')
160161
}
161162

162163
$(() => { // JQuery's callback for the DOM loading

0 commit comments

Comments
 (0)