Fix some enhancements & new features
This commit is contained in:
@@ -10,9 +10,9 @@ use Yajra\DataTables\Services\DataTable;
|
||||
|
||||
class ParentDataTable extends DataTable
|
||||
{
|
||||
public $rowReorder;
|
||||
public $colReorder; // ['selector' => 'tr']
|
||||
public $fixedColumns; // ['leftColumns' => 1, 'rightColumns' => 1]
|
||||
public $rowReorder; // ['selector' => 'tr']
|
||||
public $colReorder = true;
|
||||
public $fixedColumns = false;
|
||||
|
||||
/**
|
||||
* Build DataTable class.
|
||||
@@ -27,7 +27,7 @@ class ParentDataTable extends DataTable
|
||||
|
||||
public function modifier($datatables)
|
||||
{
|
||||
return $this->addButtons($datatables);
|
||||
return $this->addButtons($datatables->setRowId('{{$id}}'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -50,6 +50,7 @@ class ParentDataTable extends DataTable
|
||||
$buttons .= '<button type="button" data-id="{{$id}}" class="btn btn-xs btn-primary btn-edit mr-2"><i class="fa fa-fw fa-pencil-alt"></i></button>';
|
||||
$buttons .= '<button type="button" data-id="{{$id}}" class="btn btn-xs btn-danger btn-del"><i class="fa fa-fw fa-trash"></i></button>';
|
||||
return $buttons;
|
||||
// return view('components.datatables.buttons.row_action');
|
||||
}
|
||||
|
||||
public function makeColumnButtons()
|
||||
@@ -72,8 +73,7 @@ class ParentDataTable extends DataTable
|
||||
{
|
||||
return $model->newQuery();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Optional method if you want to use html builder.
|
||||
*
|
||||
@@ -126,7 +126,7 @@ class ParentDataTable extends DataTable
|
||||
{
|
||||
$dom = '';
|
||||
// $dom .= $this->getDatatablesHeaderDefault();
|
||||
$dom .= "<'overlay-block'r<t>>";
|
||||
$dom .= "rt";
|
||||
$dom .= $this->getDatatablesFooterDefault();
|
||||
return $dom;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user