diff --git a/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php b/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php
index df965c4..335fd99 100644
--- a/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php
+++ b/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php
@@ -1082,7 +1082,7 @@ protected function buildExposedFiltersGroupForm(&$form, FormStateInterface $form
           '#title' => $this->t('Weight'),
           '#title_display' => 'invisible',
           '#type' => 'weight',
-          '#delta' => 10,
+          '#delta' => count($this->options['group_info']['group_items']),
           '#default_value' => $default_weight++,
           '#attributes' => ['class' => ['weight']],
         ],
diff --git a/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/GroupedExposedFilterTest.php b/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/GroupedExposedFilterTest.php
index 5a173a9..9a9b2da 100644
--- a/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/GroupedExposedFilterTest.php
+++ b/core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/GroupedExposedFilterTest.php
@@ -81,6 +81,25 @@ public function testGroupedFilterValuesUI() {
     $between_to = $page->findField('options[group_info][group_items][1][value][max]');
     $this->assertNotEmpty($between_to->isVisible());
     $this->assertEquals('2016-01-01', $between_to->getValue());
+
+    $weight = $page->findField('options[group_info][group_items][1][weight]');
+
+    // If there are 3 items, values from -3 to 3 should be available.
+    $this->assertFalse($weight->find('named', ['option', -4]));
+    foreach (range(-3, 3) as $value) {
+      $this->assertTrue($weight->find('named', ['option', $value]));
+    }
+    $this->assertFalse($weight->find('named', ['option', 4]));
+
+    $page->pressButton("Add another item");
+    $web_assert->waitForField('options[group_info][group_items][4][title]');
+
+    // A new items was added, weight options should now be -4 to 4.
+    $this->assertFalse($weight->find('named', ['option', -5]));
+    foreach (range(-4, 4) as $value) {
+      $this->assertTrue($weight->find('named', ['option', $value]));
+    }
+    $this->assertFalse($weight->find('named', ['option', 5]));
   }
 
 }
