File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 8
8
9
9
## CHANGELOG
10
10
11
+ ### v4.30.2 - 10-06-2020
12
+
13
+ - Fix chrome bfcache issue with editor. [ #139 ] , credits to @jiwom
14
+ - Allow using callbacks as a data value. [ #127 ] , credits to @mgralikowski
15
+
11
16
### v4.30.1 - 09-29-2020
12
17
13
18
- Fix [ #134 ] laravel 8 dependencies [ #135 ] , credits to @dyanakiev .
@@ -668,6 +673,8 @@ To `created_at` with title `Created At`
668
673
[ #125 ] : https://github.com/yajra/laravel-datatables-html/pull/125
669
674
[ #131 ] : https://github.com/yajra/laravel-datatables-html/pull/131
670
675
[ #135 ] : https://github.com/yajra/laravel-datatables-html/pull/135
676
+ [ #127 ] : https://github.com/yajra/laravel-datatables-html/pull/127
677
+ [ #139 ] : https://github.com/yajra/laravel-datatables-html/pull/139
671
678
672
679
[ #134 ] : https://github.com/yajra/laravel-datatables-html/issues/134
673
680
[ #3 ] : https://github.com/yajra/laravel-datatables-html/issues/3
Original file line number Diff line number Diff line change @@ -260,7 +260,8 @@ protected function makeDataScript(array $data)
260
260
{
261
261
$ script = '' ;
262
262
foreach ($ data as $ key => $ value ) {
263
- $ script .= PHP_EOL . "data. {$ key } = ' {$ value }'; " ;
263
+ $ dataValue = $ this ->isCallbackFunction ($ value , $ key ) ? $ value : "' {$ value }' " ;
264
+ $ script .= PHP_EOL . "data. {$ key } = {$ dataValue }; " ;
264
265
}
265
266
266
267
return $ script ;
Original file line number Diff line number Diff line change 1
1
$(function(){
2
+ window.LaravelDataTables = window.LaravelDataTables || {};
2
3
$.ajaxSetup({headers: {'X-CSRF-TOKEN': '{{ csrf_token ()} } '}});
3
4
@foreach ($editors as $editor )
4
5
var {{ $editor -> instance } } = window.LaravelDataTables["%1$s-{{ $editor -> instance } } "] = new $.fn.dataTable.Editor({!! $editor -> toJson () ! !} );
You can’t perform that action at this time.
0 commit comments