meteor-admin icon indicating copy to clipboard operation
meteor-admin copied to clipboard

How to limit number of rows shown on "index" collection page

Open jricardooliveira opened this issue 9 years ago • 3 comments

Hi,

The default records per page on index page is 10. How to set to another value?

Regards Joao

jricardooliveira avatar Dec 09 '15 14:12 jricardooliveira

I was wondering the same thing.

baberuth22 avatar Jul 07 '16 21:07 baberuth22

is there any way to do this yet ?

olumytee avatar Jul 13 '16 23:07 olumytee

Hello, I managed to fix this by pulling a local copy of this package and editing /lib/both/startup.coffee as follows :


        AdminTables[name] = new Tabular.Table
            name: name
            collection: adminCollectionObject(name)
            pub: collection.children and adminTablePubName(name)
            sub: collection.sub
            columns: columns
            order: collection.order || []
            extraFields: collection.extraFields
            dom: adminTablesDom
            // add the line below
            pageLength: collection.pageLength

Then in your admin config js file add under the collection you want to display


pageLength: 100 // any number you want

Hope that works for you as well

olumytee avatar Jul 14 '16 00:07 olumytee