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.

Command icon 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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

szloredan created an issue. See original summary.

szloredan’s picture

Status: Active » Needs review
a.dmitriiev’s picture

Status: Needs review » Needs work

I see one small problem, please add validation for the per page options, that every item in the comma separated list is number.

a.dmitriiev’s picture

Maybe 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?

szloredan’s picture

Status: Needs work » Needs review
a.dmitriiev’s picture

Status: Needs review » Needs work

One more small comment.

a.dmitriiev’s picture

I 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 file modules/ui/src/Entity/SearchApiEndpoint.php method getUiSettings and probably better as an array, not a comma separated string.

a.dmitriiev’s picture

Status: Needs work » Fixed

Thanks, the exposed items per page change was merged.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.