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 88
99## CHANGELOG
1010
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+
1116### v4.30.1 - 09-29-2020
1217
1318- Fix [ #134 ] laravel 8 dependencies [ #135 ] , credits to @dyanakiev .
@@ -668,6 +673,8 @@ To `created_at` with title `Created At`
668673[ #125 ] : https://github.com/yajra/laravel-datatables-html/pull/125
669674[ #131 ] : https://github.com/yajra/laravel-datatables-html/pull/131
670675[ #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
671678
672679[ #134 ] : https://github.com/yajra/laravel-datatables-html/issues/134
673680[ #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)
260260 {
261261 $ script = '' ;
262262 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 }; " ;
264265 }
265266
266267 return $ script ;
Original file line number Diff line number Diff line change 11$(function(){
2+ window.LaravelDataTables = window.LaravelDataTables || {};
23 $.ajaxSetup({headers: {'X-CSRF-TOKEN': '{{ csrf_token ()} } '}});
34 @foreach ($editors as $editor )
45 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