File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -181,6 +181,16 @@ body.casa_cases-show {
181181 -moz-appearance : none ;
182182}
183183
184+ // removes select2 dropdown default border
185+ span .select2-selection.select2-selection--single {
186+ border : none ;
187+ }
188+
189+ // removes select2 dropdown default arrow
190+ .select2-selection__arrow {
191+ display : none ;
192+ }
193+
184194.select-wrapper {
185195 display : flex ;
186196 flex-direction : column ;
Original file line number Diff line number Diff line change @@ -159,6 +159,13 @@ function handleModalClose () {
159159 $ ( '#case-selection' ) . val ( null ) . trigger ( 'change' )
160160}
161161
162+ // re-initialized for setting modal as dropdownParent
163+ function handleDropdownSelection ( ) {
164+ if ( $ ( '#case-selection' ) . hasClass ( 'select2' ) ) {
165+ $ ( '#case-selection' ) . select2 ( ) ;
166+ }
167+ }
168+
162169$ ( ( ) => { // JQuery's callback for the DOM loading
163170 $ ( 'button.copy-court-button' ) . on ( 'click' , copyOrdersFromCaseWithConfirmation )
164171
@@ -178,6 +185,8 @@ $(() => { // JQuery's callback for the DOM loading
178185 // modal id is defined in _generate_docx.html.erb so would like to be able to implement modal close logic in that file
179186 // but not sure how to
180187 $ ( '#generate-docx-report-modal' ) . on ( 'hidden.bs.modal' , ( ) => handleModalClose ( ) )
188+
189+ $ ( '#generate-docx-report-modal' ) . on ( 'shown.bs.modal' , ( ) => handleDropdownSelection ( ) )
181190
182191 $ ( '#btnGenerateReport' ) . on ( 'click' , handleGenerateReport )
183192
You can’t perform that action at this time.
0 commit comments