Topic: How to enter entriesOption via data-mdb ?
launchbrigade pro premium priority asked 3 years ago
I have tried :
data-mdb-entriesOptions="[5, 10, 25, 50]"
and
data-mdb-entriesOptions="5, 10, 25, 50"
neither seems to work. is this even possible? do I have to initialize via javascript ?
Michał Duszak staff answered 3 years ago
Hello, it looks like you're trying to define options in a data object. Third parameter of datatable's constructor is options
, so it looks like this:
new mdb.Datatable(document.getElementById('datatable'), advancedData, {
entries: 5,
entriesOptions: [5, 10, 25, 50],
borderless: true,
})
Here is a snippet: https://mdbootstrap.com/snippets/standard/m-duszak/3784983#js-tab-view
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: Yes
- Technology: MDB Standard
- MDB Version: MDB5 3.9.0
- Device: All
- Browser: All
- OS: All
- Provided sample code: No
- Provided link: No
launchbrigade pro premium priority commented 3 years ago
Actually even using javascript doesn't work: