File tree Expand file tree Collapse file tree 1 file changed +29
-17
lines changed
src/resources/views/crud/inc Expand file tree Collapse file tree 1 file changed +29
-17
lines changed Original file line number Diff line number Diff line change 77 }
88@endphp
99
10- @push (' crud_fields_styles' )
11- <style >
12- .nav-tabs-custom {
13- box-shadow : none ;
14- }
15- .nav-tabs-custom > .nav-tabs.nav-stacked > li {
16- margin-right : 0 ;
17- }
18-
19- .tab-pane .form-group h1 :first-child ,
20- .tab-pane .form-group h2 :first-child ,
21- .tab-pane .form-group h3 :first-child {
22- margin-top : 0 ;
23- }
24- </style >
25- @endpush
26-
2710@if ($crud -> getFieldsWithoutATab ()-> filter (function ($value , $key ) { return $value [' type' ] != ' hidden' ; })-> count () )
2811<div class =" card" >
2912 <div class =" card-body row" >
@@ -66,3 +49,32 @@ class="nav-link {{ isset($tabWithError) ? ($tab == $tabWithError ? 'active' : ''
6649 </div >
6750</div >
6851
52+ @push (' crud_fields_styles' )
53+ <style >
54+ .nav-tabs-custom {
55+ box-shadow : none ;
56+ }
57+ .nav-tabs-custom > .nav-tabs.nav-stacked > li {
58+ margin-right : 0 ;
59+ }
60+
61+ .tab-pane .form-group h1 :first-child ,
62+ .tab-pane .form-group h2 :first-child ,
63+ .tab-pane .form-group h3 :first-child {
64+ margin-top : 0 ;
65+ }
66+ </style >
67+ @endpush
68+
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 >
79+ @endpush
80+
You can’t perform that action at this time.
0 commit comments