Skip to content

Commit b39d141

Browse files
committed
Add docs section about setting default order
Refs #48
1 parent cd9b93e commit b39d141

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/source/index.html.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,16 @@ The `options` are passed (almost) verbatim to the DataTables clientside construc
200200
options. Only options which are meaningful to be defined serverside can be set at this level, so
201201
setting callbacks and events is not possible. These are however easily set on the Javascript end.
202202

203+
## Table configuration
204+
205+
Configuring a specific table is done mainly via the methods on `DataTable`. The most common call
206+
is `add` to add an extra column to the table as seen in all the examples. More utility methods
207+
exist and can be chained.
208+
209+
`->addOrderBy($column, string $direction = DataTable::SORT_ASCENDING)`
210+
Will set the default sort of the table to the specified column and direction. Repeatable to sort
211+
by multiple columns.
212+
203213
# Adapters
204214

205215
Adapters are the core elements bridging DataTables functionality to their underlying data source.

0 commit comments

Comments
 (0)