Skip to content

Commit

Permalink
Merge pull request #5 from xini/fix-limit
Browse files Browse the repository at this point in the history
fix limit field name
  • Loading branch information
dizzystuff authored Jun 28, 2022
2 parents 8aca003 + b0d3af8 commit c5b6329
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Model/MenuSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,8 @@ public function updateFromConfig($data)

if (isset($data['limit'])) {
$limit = (int) $data['limit'];
if ($limit !== (int) $this->Limit) {
$this->Limit = $limit;
if ($limit !== (int) $this->ItemsLimit) {
$this->ItemsLimit = $limit;
$doWrite = true;
}
}
Expand Down Expand Up @@ -437,8 +437,8 @@ public function getCMSFields()
$itemsAdder = new GridFieldAddNewMultiClass();
$itemsAdder->setClasses($this->getMenuItemClasses());

if ($this->Limit > 0) {
$itemsLimiter = new GridFieldLimiter($this->Limit, 'before', true);
if ($this->ItemsLimit > 0) {
$itemsLimiter = new GridFieldLimiter($this->ItemsLimit, 'before', true);
$itemsConfig->addComponent($itemsLimiter);
$itemsAdder->setFragment('limiter-before-left');
}
Expand Down

0 comments on commit c5b6329

Please sign in to comment.