use control-group for add-rows widget, fix paginator overflowing with hundreds of items

This commit is contained in:
2018-08-10 20:46:43 +02:00
parent a3df7a724c
commit 23f27e6f34
2 changed files with 44 additions and 27 deletions
+12 -2
View File
@@ -619,9 +619,19 @@ class Changeset
return $c->cast(null);
})->all();
foreach ($this->newColumns as $k => $obj) {
$cols[] = $c = new Column($obj);
$c->markAsNew();
$emptyTpl[$k] = $c->cast(null);
}
$this->newRows = array_filter($this->newRows, function ($r) use ($emptyTpl) {
$emptyTpl['_id'] = $r['_id'];
return $emptyTpl != $r;
foreach ($r as $k => $val) {
if ($k[0] == '_') continue;
if ($val != $emptyTpl[$k]) return true;
}
return false;
});
}
}