mirror of
https://github.com/UndefinedOffset/SortableGridField.git
synced 2024-10-22 17:05:38 +02:00
Corrected documentation example for appending to top
This commit is contained in:
parent
1e24d1e888
commit
97ca1f8f4d
@ -48,7 +48,8 @@ GridFieldSortableRows provides 4 "events" onBeforeGridFieldRowSort(), onAfterGri
|
||||
#### Appending to the top instead of the bottom
|
||||
By default GridFieldSortable rows appends to the bottom of the list for performance on large data sets, however you can set new records to append new records to the top by calling setAppendToTop(true) on your GridFieldSortableRows instance.
|
||||
```php
|
||||
$myGridConfig->addComponent(GridFieldSortableRows::create('SortOrder')->setAppendToTop(true));
|
||||
$myGridConfig->addComponent($sortable=new GridFieldSortableRows('SortOrder'));
|
||||
$sortable->setAppendToTop(true);
|
||||
```
|
||||
|
||||
## Migrating from SilverStripe 2.4 and Data Object Manager's SortableDataObject
|
||||
|
Loading…
Reference in New Issue
Block a user