Closed Selion05 closed 5 years ago
See additional explanation here: https://github.com/sonata-project/SonataDoctrineORMAdminBundle/pull/910#discussion_r261342948
I think this issue is still valid, but with different subject.
if (0 === $this->getPage() || 0 === $this->getMaxPerPage() || 0 === $this->getNbResults()) {
$this->setLastPage(0);
} else {
this sets last page to 0 while ajax asks for page 1 it results with isLastPage()=false ("more"=true) when first page has no results.
This issue is one year old, and you're saying the subject is different. I recommend you to create your own issue with all the required information. ;)
Environment
Sonata packages
Symfony packages
PHP version
Subject
https://github.com/sonata-project/SonataDoctrineORMAdminBundle/blob/473c8a62dd95b5a44666085bcd9ac1276c5c6964/src/Datagrid/Pager.php#L79
ceil returns float while setLastPage expects an int combined with commit b6bc0297d524fdcf361d77a5181508ba58bcf6a5 from admin bundle (strict type checking) yields to
more
allways being true in get-autocomplete-items