@ -45,7 +45,9 @@ class TableController extends Controller
$columns = Column::columnsFromJson($revision->columns);
$rows = $revision->rowsData($columns)->paginate(25, []);
$rq = $revision->rowsData($columns);
if (count($columns)) $rq = $rq->orderByRaw("data->>'".$columns[0]->id."'");
$rows = $rq->paginate(25, []);
return view('table.view', [
'table' => $tableModel,