diff --git a/core/lib/Drupal/Core/Config/Entity/DraggableListBuilder.php b/core/lib/Drupal/Core/Config/Entity/DraggableListBuilder.php index e3eada9..3fea947 100644 --- a/core/lib/Drupal/Core/Config/Entity/DraggableListBuilder.php +++ b/core/lib/Drupal/Core/Config/Entity/DraggableListBuilder.php @@ -118,8 +118,13 @@ public function buildForm(array $form, FormStateInterface $form_state) { ); $this->entities = $this->load(); + $delta = 10; + // Change the delta of the weight field if have more than 20 entities. if (!empty($this->weightKey)) { - $delta = ceil(count($this->entities) / 2); + $count = count($this->entities); + if ($count > 20) { + $delta = ceil(count($this->entities) / 2); + } } foreach ($this->entities as $entity) { $row = $this->buildRow($entity);