Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
The page limit can not be modified from the JS application.
Proposed resolution
Create a setting for allowed page limit options for endpoint and if the request "limit" parameter is sent use that value to build the pager for results.
Issue fork search_api_decoupled-3406471
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
szloredan CreditAttribution: szloredan at 1xINTERNET commentedComment #4
a.dmitriiev CreditAttribution: a.dmitriiev as a volunteer and at 1xINTERNET commentedI see one small problem, please add validation for the per page options, that every item in the comma separated list is number.
Comment #5
a.dmitriiev CreditAttribution: a.dmitriiev as a volunteer and at 1xINTERNET commentedMaybe it is even a better idea to change the config schema from string to sequence of numbers and then even store it already as list of numbers in the configuration. What do you think?
Comment #6
szloredan CreditAttribution: szloredan at 1xINTERNET commentedComment #7
a.dmitriiev CreditAttribution: a.dmitriiev as a volunteer and at 1xINTERNET commentedOne more small comment.
Comment #8
a.dmitriiev CreditAttribution: a.dmitriiev as a volunteer and at 1xINTERNET commentedI was thinking, that maybe the label of a new setting should state that this value will be exposed as url parameter
limit
. Moreover this setting should be actually exposed here/api/search/{search_api_endpoint}/ui-settings
in this filemodules/ui/src/Entity/SearchApiEndpoint.php
methodgetUiSettings
and probably better as an array, not a comma separated string.Comment #10
a.dmitriiev CreditAttribution: a.dmitriiev as a volunteer and at 1xINTERNET commentedThanks, the exposed items per page change was merged.