Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/js/src/core/app/config/app-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const DEFAULT_PAGE_SIZE_OPTIONS = [10, 20, 50, 100]
const DEFAULT_PAGE_SIZE = 20

/** Kept in sync with pimcore_studio_ui.pagination.max_page_size. */
const DEFAULT_MAX_PAGE_SIZE = 1000
const DEFAULT_MAX_PAGE_SIZE = 200

const appElement = getParentDocument().querySelector('#app')
export const currentDomain = window.location.origin
Expand Down
Binary file removed build-dist/build-e8b3dc893b1a.zip
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pimcore_studio_ui:
pagination:
page_size_options: [10, 20, 50, 100]
default_page_size: 20
max_page_size: 1000
max_page_size: 200
```

`max_page_size` caps what a user may enter; it is not offered as an option. `page_size_options` also accepts a
Expand Down
2 changes: 1 addition & 1 deletion src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ private function createPaginationNode(): NodeDefinition
'Keep it well below the search index result window (index.max_result_window).'
)
->min(1)
->defaultValue(1000)
->defaultValue(200)
->end()
->end()
->validate()
Expand Down
6 changes: 3 additions & 3 deletions tests/Unit/DependencyInjection/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function testPaginationDefaults(): void

$this->assertSame([10, 20, 50, 100], $config['pagination']['page_size_options']);
$this->assertSame(20, $config['pagination']['default_page_size']);
$this->assertSame(1000, $config['pagination']['max_page_size']);
$this->assertSame(200, $config['pagination']['max_page_size']);
}

public function testPageSizeOptionsAcceptAList(): void
Expand Down Expand Up @@ -125,8 +125,8 @@ public function testPageSizeOptionsMustNotExceedMaxPageSize(): void
$this->expectExceptionMessage('max_page_size');

$this->process(['pagination' => [
'page_size_options' => [10, 20, 5000],
'max_page_size' => 1000,
'page_size_options' => [10, 20, 500],
'max_page_size' => 200,
]]);
}

Expand Down
Loading