File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
src/resources/views/crud/inc Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -63,18 +63,18 @@ class="nav-link {{ isset($tabWithError) ? ($tab == $tabWithError ? 'active' : ''
6363 .tab-pane .form-group h3 :first-child {
6464 margin-top : 0 ;
6565 }
66- </style >
67- @endpush
6866
69- @push (' crud_fields_scripts' )
70- <script >
71- // when select2 is multiple and it's not on the first displayed tab the placeholder would
72- // not display correctly because the element was not "visible" on the page (hidden by tab)
73- // thus getting `0px` width. This makes sure that the placeholder element is always 100% width
74- $ (' a[data-toggle="tab"]' ).on (' shown.bs.tab' , function (e ) {
75- $ (' .select2-search .select2-search--inline' ).css (' width' , ' 100%' );
76- $ (' .select2-search__field' ).css (' width' , ' 100%' );
77- })
78- </script >
67+ /*
68+ when select2 is multiple and it's not on the first displayed tab the placeholder would
69+ not display correctly because the element was not "visible" on the page (hidden by tab)
70+ thus getting `0px` width. This makes sure that the placeholder element is always 100% width
71+ by preventing the select2 inline style (0px) from applying using !important
72+ */
73+ .select2-container ,
74+ .select2-container li :only-child ,
75+ .select2-container input :placeholder-shown {
76+ width : 100% !important ;
77+ }
78+ </style >
7979@endpush
8080
You can’t perform that action at this time.
0 commit comments