Datatables new layout
This commit is contained in:
19
resources/views/components/datatables/search.blade.php
Normal file
19
resources/views/components/datatables/search.blade.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-search"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control search-btn" placeholder="Rechercher..." value="">
|
||||
<div class="input-group-append">
|
||||
@include('components.datatables.buttons.filters')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
var $search = $('#{{ $model }}-table-header .search-btn');
|
||||
$search.on( 'keyup click', function () {
|
||||
var table = window.LaravelDataTables["{{ $model }}-table"];
|
||||
table.search($search.val()).draw();
|
||||
} );
|
||||
</script>
|
||||
@endpush
|
||||
Reference in New Issue
Block a user