pageLength option saved as string instead of integer

Created on 1 June 2023, over 1 year ago

Problem/Motivation

Saving the options form causes the pageLength config to be saved as a string instead of an integer. dataTables pagination behaves incorrectly when passed a string for this parameter instead of an integer.

Steps to reproduce

Change page length at admin/config/csvfile_formatter/data-tables-settings and save form. Load a node with a table that has more than 4 or more pages. Clicking on page 2 causes all remaining rows to display despite the pageLength setting.

Proposed resolution

Cast pageLength as integer in DataTablesSettingsForm submitForm.
'pageLength' => (int) $form_state->getValue('pageLength'),

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇯🇵Japan matthewmessmer

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024