File tree 1 file changed +12
-2
lines changed 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -249,16 +249,26 @@ public function escapeColumns($columns = '*')
249
249
/**
250
250
* Set columns that should not be escaped.
251
251
*
252
+ * Optionally merge the defaults from config
253
+ *
252
254
* @param array $columns
255
+ * @param bool $merge
253
256
* @return $this
254
257
*/
255
- public function rawColumns (array $ columns )
258
+ public function rawColumns (array $ columns, $ merge = false )
256
259
{
257
- $ this ->columnDef ['raw ' ] = $ columns ;
260
+ if ($ merge ) {
261
+ $ config = $ this ->config ->get ('datatables.columns ' );
262
+
263
+ $ this ->columnDef ['raw ' ] = array_merge ($ config ['raw ' ], $ columns );
264
+ } else {
265
+ $ this ->columnDef ['raw ' ] = $ columns ;
266
+ }
258
267
259
268
return $ this ;
260
269
}
261
270
271
+
262
272
/**
263
273
* Sets DT_RowClass template.
264
274
* result: <tr class="output_from_your_template">.
You can’t perform that action at this time.
0 commit comments