Permalink
Browse files

Toggle is now hidden if there are no items in the grid much like Grid…

…FieldPaginator
  • Loading branch information...
1 parent 313b0bd commit 38c6515d641f26d6fc2cd053dafe193db72ed72e @UndefinedOffset committed Jul 18, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 code/forms/GridFieldSortableRows.php
@@ -26,7 +26,7 @@ public function getHTMLFragments($gridField) {
}
//Ensure user can edit
- if(!singleton($gridField->getModelClass())->canEdit()){
+ if(!singleton($gridField->getModelClass())->canEdit() || !$gridField->getList() || $gridField->getList()->Count()==0){
return array();
}

0 comments on commit 38c6515

Please sign in to comment.