yogiben / meteor-admin

A complete admin dashboard solution
https://atmospherejs.com/yogiben/admin
GNU General Public License v3.0
827 stars 261 forks source link

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

Open jricardooliveira opened 8 years ago

jricardooliveira commented 8 years ago

Hi,

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

Regards Joao

baberuth22 commented 8 years ago

I was wondering the same thing.

olumytee commented 8 years ago

is there any way to do this yet ?

olumytee commented 8 years ago

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