mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 19:48:49 +02:00
N°2598 - When refreshing a list, loosing page and order - improvement of code
This commit is contained in:
@@ -8,6 +8,7 @@ namespace Combodo\iTop\Application\UI\Base\Component\DataTable;
|
||||
|
||||
|
||||
use Combodo\iTop\Application\UI\Base\Layout\UIContentBlock;
|
||||
use Combodo\iTop\Application\UI\Base\tJSRefreshCallback;
|
||||
use DataTableConfig;
|
||||
|
||||
/**
|
||||
@@ -18,6 +19,8 @@ use DataTableConfig;
|
||||
*/
|
||||
class DataTable extends UIContentBlock
|
||||
{
|
||||
use tJSRefreshCallback;
|
||||
|
||||
// Overloaded constants
|
||||
public const BLOCK_CODE = 'ibo-datatable';
|
||||
public const DEFAULT_HTML_TEMPLATE_REL_PATH = 'base/components/datatable/layout';
|
||||
@@ -159,8 +162,9 @@ class DataTable extends UIContentBlock
|
||||
$this->aOptions = $aOptions;
|
||||
}
|
||||
|
||||
public function GetJSRefresh():array{
|
||||
return ["$('#".$this->sId."').DataTable().clearPipeline();
|
||||
$('#".$this->sId."').DataTable().ajax.reload(null, false);"];
|
||||
public function GetJSRefresh(): string
|
||||
{
|
||||
return "$('#".$this->sId."').DataTable().clearPipeline();
|
||||
$('#".$this->sId."').DataTable().ajax.reload(null, false);";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user