From 15ead2ae9421613aff9abf99f0ad4e5f1c7f1205 Mon Sep 17 00:00:00 2001 From: Ed Date: Sat, 19 Oct 2013 14:49:41 -0300 Subject: [PATCH] Added note about appending to the top --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6b5f46d..b2ef3e0 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ To move an item to another page drag the row over the respective page button and GridFieldSortableRows provides 4 "events" onBeforeGridFieldRowSort(), onAfterGridFieldRowSort(), onBeforeGridFieldPageSort() and onAfterGridFieldPageSort(). These "events" are passed a clone of the DataList used in GridFieldSortableRows, in the case of page sorting this list has a limit that shows you the current page plus/minus one object. For GridFieldSortableRows that are on ModelAdmin decendents these events are called on the ModelAdmin if they do not have a owner DataObject, if you are using GridFieldSortableRows on a GridField for a DataObject's relationship the events are called on that DataObject. #### Appending to the top instead of the bottom -GridFieldSortable rows allows you to append new records to the top by calling setAppendToTop(true). +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)); ```