From 97ca1f8f4d71485eb4c8a0f03a30655f14776ecd Mon Sep 17 00:00:00 2001 From: UndefinedOffset Date: Mon, 24 Feb 2014 16:03:50 -0400 Subject: [PATCH] Corrected documentation example for appending to top --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9924fe7..bc264af 100644 --- a/README.md +++ b/README.md @@ -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