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

This commit is contained in:
UndefinedOffset 2012-07-18 10:13:17 -03:00
parent 313b0bd3f3
commit 38c6515d64
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ class GridFieldSortableRows implements GridField_HTMLProvider, GridField_ActionP
}
//Ensure user can edit
if(!singleton($gridField->getModelClass())->canEdit()){
if(!singleton($gridField->getModelClass())->canEdit() || !$gridField->getList() || $gridField->getList()->Count()==0){
return array();
}