Could someone teach me how to do this?To override the default records per page options, set AppGini.config.recordsPerPageOptions as an array of integers in hooks/header-extras.php or hooks/footer-extras.php.
Thanks
Could someone teach me how to do this?To override the default records per page options, set AppGini.config.recordsPerPageOptions as an array of integers in hooks/header-extras.php or hooks/footer-extras.php.
Thanks for the help, but I think there should be a checkbox in the Appgini IDE to enable or disable the option.fdissait wrote: ↑2024-07-06 14:56Hello
The way I founded (bad) was to edit common.js
AppGini.renderTVRecordsPerPageSelector = () => {
// if not TV, return
if(!AppGini.currentViewIs('TV')) return;
// if records per page selector already rendered, return
if($j('#records-per-page-selector').length) return;
// to override the default records per page options,
// set AppGini.config.recordsPerPageOptions as an array of integers
// in hooks/header-extras.php or hooks/footer-extras.php
let rppOptions = [5, 10, 20, 30, 40, 50, 100, 200];
if(AppGini.config.recordsPerPageOptions) {
rppOptions = AppGini.config.recordsPerPageOptions;
}
and edit let rppOptions according to my choice : let rppOptions = [5, 10, 15, 30, 50];
Editing hooks/header-extras.php
like this :
<script>
// to set an array of 5,10,15,30,50 records
let AppGini.config.recordsPerPageOptions = [5, 10, 15, 30, 50];
</script>
has no effect.
François