web
mobile
Edit these docs Rate these docs

Vue Bootstrap Datatables

Vue Datatables - Bootstrap 4 & Material Design. Examples & tutorial.

Tables let you aggregate a huge amount of data and present it in the clear and orderly way. Vue Bootstrap Datatables provide additional benefits like responsiveness and the possibility to manipulate the styles of the tables. With Datatables you can use an advanced options like sorting, searching or pagination. Also, our Datatables are scallable and responsive.


Basic example

Name Position Office Age Start date Salary
Tiger Nixon System Architect Edinburgh 61 2011/04/25 $320,800
Garrett Winters Accountant Tokyo 63 2011/07/25 $170,750
Ashton Cox Junior Technical Author San Francisco 66 2009/01/12 $86,000
Cedric Kelly Senior Javascript Developer Edinburgh 22 2012/03/29 $433,060
Airi Satou Accountant Tokyo 33 2008/11/28 $162,700
Brielle Williamson Integration Specialist New York 61 2012/12/02 $372,000
Herrod Chandler Sales Assistant San Francisco 59 2012/08/06 $137,500
Rhona Davidson Integration Specialist Tokyo 55 2010/10/14 $327,900
Colleen Hurst Javascript Developer San Francisco 39 2009/09/15 $205,500
Sonya Frost Software Engineer Edinburgh 23 2008/12/13 $103,600
Jena Gaines Office Manager London 30 2008/12/19 $90,560
Quinn Flynn Support Lead Edinburgh 22 2013/03/03 $342,000
Charde Marshall Regional Director San Francisco 36 2008/10/16 $470,600
Haley Kennedy Senior Marketing Designer London 43 2012/12/18 $313,500
Tatyana Fitzpatrick Regional Director London 19 2010/03/17 $385,750
Michael Silva Marketing Designer London 66 2012/11/27 $198,500
Paul Byrd Chief Financial Officer (CFO) New York 64 2010/06/09 $725,000
Gloria Little Systems Administrator New York 59 2009/04/10 $237,500
Bradley Greer Software Engineer London 41 2012/10/13 $132,000
Dai Rios Personnel Lead Edinburgh 35 2012/09/26 $217,500
Jenette Caldwell Development Lead New York 30 2011/09/03 $345,000
Yuri Berry Chief Marketing Officer (CMO) New York 40 2009/06/25 $675,000
Caesar Vance Pre-Sales Support New York 21 2011/12/12 $106,450
Doris Wilder Sales Assistant Sidney 23 2010/09/20 $85,600
Angelica Ramos Chief Executive Officer (CEO) London 47 2009/10/09 $1,200,000
Gavin Joyce Developer Edinburgh 42 2010/12/22 $92,575
Jennifer Chang Regional Director Singapore 28 2010/11/14 $357,650
Brenden Wagner Software Engineer San Francisco 28 2011/06/07 $206,850
Fiona Green Chief Operating Officer (COO) San Francisco 48 2010/03/11 $850,000
Shou Itou Regional Marketing Tokyo 20 2011/08/14 $163,000
Michelle House Integration Specialist Sidney 37 2011/06/02 $95,400
Suki Burks Developer London 53 2009/10/22 $114,500
Prescott Bartlett Technical Author London 27 2011/05/07 $145,000
Gavin Cortez Team Leader San Francisco 22 2008/10/26 $235,500
Martena Mccray Post-Sales support Edinburgh 46 2011/03/09 $324,050
Unity Butler Marketing Designer San Francisco 47 2009/12/09 $85,675
Howard Hatfield Office Manager San Francisco 51 2008/12/16 $164,500
Hope Fuentes Secretary San Francisco 41 2010/02/12 $109,850
Vivian Harrell Financial Controller San Francisco 62 2009/02/14 $452,500
Timothy Mooney Office Manager London 37 2008/12/11 $136,200
Jackson Bradshaw Director New York 65 2008/09/26 $645,750
Olivia Liang Support Engineer Singapore 64 2011/02/03 $234,500
Bruno Nash Software Engineer London 38 2011/05/03 $163,500
Sakura Yamamoto Support Engineer Tokyo 37 2009/08/19 $139,575
Thor Walton Developer New York 61 2013/08/11 $98,540
Finn Camacho Support Engineer San Francisco 47 2009/07/07 $87,500
Serge Baldwin Data Coordinator Singapore 64 2012/04/09 $138,575
Zenaida Frank Software Engineer New York 63 2010/01/04 $125,250
Zorita Serrano Software Engineer San Francisco 56 2012/06/01 $115,000
Jennifer Acosta Junior Javascript Developer Edinburgh 43 2013/02/01 $75,650
Cara Stevens Sales Assistant New York 46 2011/12/06 $145,600
Hermione Butler Regional Director London 47 2011/03/21 $356,250
Lael Greer Systems Administrator London 21 2009/02/27 $103,500
Jonas Alexander Developer San Francisco 30 2010/07/14 $86,500
Shad Decker Regional Director Edinburgh 51 2008/11/13 $183,000
Michael Bruce Javascript Developer Singapore 29 2011/06/27 $183,000
Donna Snider Customer Support New York 27 2011/01/25 $112,000
Name Position Office Age Start date Salary

        <template>
          <mdb-datatable
            :data="data"
            striped
            bordered
          />
        </template>
      

        <script>
          import { mdbDatatable } from 'mdbvue';
          export default {
            name: 'DatatablePage',
            components: {
              mdbDatatable
            },
            data() {
              return {
                data: {
                  columns: [
                    {
                      label: 'Name',
                      field: 'name',
                      sort: 'asc'
                    },
                    {
                      label: 'Position',
                      field: 'position',
                      sort: 'asc'
                    },
                    {
                      label: 'Office',
                      field: 'office',
                      sort: 'asc'
                    },
                    {
                      label: 'Age',
                      field: 'age',
                      sort: 'asc'
                    },
                    {
                      label: 'Start date',
                      field: 'date',
                      sort: 'asc'
                    },
                    {
                      label: 'Salary',
                      field: 'salary',
                      sort: 'asc'
                    }
                  ],
                  rows: [
                    {
                      name: 'Tiger Nixon',
                      position: 'System Architect',
                      office: 'Edinburgh',
                      age: '61',
                      date: '2011/04/25',
                      salary: '$320'
                    },
                    {
                      name: 'Garrett Winters',
                      position: 'Accountant',
                      office: 'Tokyo',
                      age: '63',
                      date: '2011/07/25',
                      salary: '$170'
                    },
                    {
                      name: 'Ashton Cox',
                      position: 'Junior Technical Author',
                      office: 'San Francisco',
                      age: '66',
                      date: '2009/01/12',
                      salary: '$86'
                    },
                    {
                      name: 'Cedric Kelly',
                      position: 'Senior Javascript Developer',
                      office: 'Edinburgh',
                      age: '22',
                      date: '2012/03/29',
                      salary: '$433'
                    },
                    {
                      name: 'Airi Satou',
                      position: 'Accountant',
                      office: 'Tokyo',
                      age: '33',
                      date: '2008/11/28',
                      salary: '$162'
                    },
                    {
                      name: 'Brielle Williamson',
                      position: 'Integration Specialist',
                      office: 'New York',
                      age: '61',
                      date: '2012/12/02',
                      salary: '$372'
                    },
                    {
                      name: 'Herrod Chandler',
                      position: 'Sales Assistant',
                      office: 'San Francisco',
                      age: '59',
                      date: '2012/08/06',
                      salary: '$137'
                    },
                    {
                      name: 'Rhona Davidson',
                      position: 'Integration Specialist',
                      office: 'Tokyo',
                      age: '55',
                      date: '2010/10/14',
                      salary: '$327'
                    },
                    {
                      name: 'Colleen Hurst',
                      position: 'Javascript Developer',
                      office: 'San Francisco',
                      age: '39',
                      date: '2009/09/15',
                      salary: '$205'
                    },
                    {
                      name: 'Sonya Frost',
                      position: 'Software Engineer',
                      office: 'Edinburgh',
                      age: '23',
                      date: '2008/12/13',
                      salary: '$103'
                    },
                    {
                      name: 'Jena Gaines',
                      position: 'Office Manager',
                      office: 'London',
                      age: '30',
                      date: '2008/12/19',
                      salary: '$90'
                    },
                    {
                      name: 'Quinn Flynn',
                      position: 'Support Lead',
                      office: 'Edinburgh',
                      age: '22',
                      date: '2013/03/03',
                      salary: '$342'
                    },
                    {
                      name: 'Charde Marshall',
                      position: 'Regional Director',
                      office: 'San Francisco',
                      age: '36',
                      date: '2008/10/16',
                      salary: '$470'
                    },
                    {
                      name: 'Haley Kennedy',
                      position: 'Senior Marketing Designer',
                      office: 'London',
                      age: '43',
                      date: '2012/12/18',
                      salary: '$313'
                    },
                    {
                      name: 'Tatyana Fitzpatrick',
                      position: 'Regional Director',
                      office: 'London',
                      age: '19',
                      date: '2010/03/17',
                      salary: '$385'
                    },
                    {
                      name: 'Michael Silva',
                      position: 'Marketing Designer',
                      office: 'London',
                      age: '66',
                      date: '2012/11/27',
                      salary: '$198'
                    },
                    {
                      name: 'Paul Byrd',
                      position: 'Chief Financial Officer (CFO)',
                      office: 'New York',
                      age: '64',
                      date: '2010/06/09',
                      salary: '$725'
                    },
                    {
                      name: 'Gloria Little',
                      position: 'Systems Administrator',
                      office: 'New York',
                      age: '59',
                      date: '2009/04/10',
                      salary: '$237'
                    },
                    {
                      name: 'Bradley Greer',
                      position: 'Software Engineer',
                      office: 'London',
                      age: '41',
                      date: '2012/10/13',
                      salary: '$132'
                    },
                    {
                      name: 'Dai Rios',
                      position: 'Personnel Lead',
                      office: 'Edinburgh',
                      age: '35',
                      date: '2012/09/26',
                      salary: '$217'
                    },
                    {
                      name: 'Jenette Caldwell',
                      position: 'Development Lead',
                      office: 'New York',
                      age: '30',
                      date: '2011/09/03',
                      salary: '$345'
                    },
                    {
                      name: 'Yuri Berry',
                      position: 'Chief Marketing Officer (CMO)',
                      office: 'New York',
                      age: '40',
                      date: '2009/06/25',
                      salary: '$675'
                    },
                    {
                      name: 'Caesar Vance',
                      position: 'Pre-Sales Support',
                      office: 'New York',
                      age: '21',
                      date: '2011/12/12',
                      salary: '$106'
                    },
                    {
                      name: 'Doris Wilder',
                      position: 'Sales Assistant',
                      office: 'Sidney',
                      age: '23',
                      date: '2010/09/20',
                      salary: '$85'
                    },
                    {
                      name: 'Angelica Ramos',
                      position: 'Chief Executive Officer (CEO)',
                      office: 'London',
                      age: '47',
                      date: '2009/10/09',
                      salary: '$1'
                    },
                    {
                      name: 'Gavin Joyce',
                      position: 'Developer',
                      office: 'Edinburgh',
                      age: '42',
                      date: '2010/12/22',
                      salary: '$92'
                    },
                    {
                      name: 'Jennifer Chang',
                      position: 'Regional Director',
                      office: 'Singapore',
                      age: '28',
                      date: '2010/11/14',
                      salary: '$357'
                    },
                    {
                      name: 'Brenden Wagner',
                      position: 'Software Engineer',
                      office: 'San Francisco',
                      age: '28',
                      date: '2011/06/07',
                      salary: '$206'
                    },
                    {
                      name: 'Fiona Green',
                      position: 'Chief Operating Officer (COO)',
                      office: 'San Francisco',
                      age: '48',
                      date: '2010/03/11',
                      salary: '$850'
                    },
                    {
                      name: 'Shou Itou',
                      position: 'Regional Marketing',
                      office: 'Tokyo',
                      age: '20',
                      date: '2011/08/14',
                      salary: '$163'
                    },
                    {
                      name: 'Michelle House',
                      position: 'Integration Specialist',
                      office: 'Sidney',
                      age: '37',
                      date: '2011/06/02',
                      salary: '$95'
                    },
                    {
                      name: 'Suki Burks',
                      position: 'Developer',
                      office: 'London',
                      age: '53',
                      date: '2009/10/22',
                      salary: '$114'
                    },
                    {
                      name: 'Prescott Bartlett',
                      position: 'Technical Author',
                      office: 'London',
                      age: '27',
                      date: '2011/05/07',
                      salary: '$145'
                    },
                    {
                      name: 'Gavin Cortez',
                      position: 'Team Leader',
                      office: 'San Francisco',
                      age: '22',
                      date: '2008/10/26',
                      salary: '$235'
                    },
                    {
                      name: 'Martena Mccray',
                      position: 'Post-Sales support',
                      office: 'Edinburgh',
                      age: '46',
                      date: '2011/03/09',
                      salary: '$324'
                    },
                    {
                      name: 'Unity Butler',
                      position: 'Marketing Designer',
                      office: 'San Francisco',
                      age: '47',
                      date: '2009/12/09',
                      salary: '$85'
                    },
                    {
                      name: 'Howard Hatfield',
                      position: 'Office Manager',
                      office: 'San Francisco',
                      age: '51',
                      date: '2008/12/16',
                      salary: '$164'
                    },
                    {
                      name: 'Hope Fuentes',
                      position: 'Secretary',
                      office: 'San Francisco',
                      age: '41',
                      date: '2010/02/12',
                      salary: '$109'
                    },
                    {
                      name: 'Vivian Harrell',
                      position: 'Financial Controller',
                      office: 'San Francisco',
                      age: '62',
                      date: '2009/02/14',
                      salary: '$452'
                    },
                    {
                      name: 'Timothy Mooney',
                      position: 'Office Manager',
                      office: 'London',
                      age: '37',
                      date: '2008/12/11',
                      salary: '$136'
                    },
                    {
                      name: 'Jackson Bradshaw',
                      position: 'Director',
                      office: 'New York',
                      age: '65',
                      date: '2008/09/26',
                      salary: '$645'
                    },
                    {
                      name: 'Olivia Liang',
                      position: 'Support Engineer',
                      office: 'Singapore',
                      age: '64',
                      date: '2011/02/03',
                      salary: '$234'
                    },
                    {
                      name: 'Bruno Nash',
                      position: 'Software Engineer',
                      office: 'London',
                      age: '38',
                      date: '2011/05/03',
                      salary: '$163'
                    },
                    {
                      name: 'Sakura Yamamoto',
                      position: 'Support Engineer',
                      office: 'Tokyo',
                      age: '37',
                      date: '2009/08/19',
                      salary: '$139'
                    },
                    {
                      name: 'Thor Walton',
                      position: 'Developer',
                      office: 'New York',
                      age: '61',
                      date: '2013/08/11',
                      salary: '$98'
                    },
                    {
                      name: 'Finn Camacho',
                      position: 'Support Engineer',
                      office: 'San Francisco',
                      age: '47',
                      date: '2009/07/07',
                      salary: '$87'
                    },
                    {
                      name: 'Serge Baldwin',
                      position: 'Data Coordinator',
                      office: 'Singapore',
                      age: '64',
                      date: '2012/04/09',
                      salary: '$138'
                    },
                    {
                      name: 'Zenaida Frank',
                      position: 'Software Engineer',
                      office: 'New York',
                      age: '63',
                      date: '2010/01/04',
                      salary: '$125'
                    },
                    {
                      name: 'Zorita Serrano',
                      position: 'Software Engineer',
                      office: 'San Francisco',
                      age: '56',
                      date: '2012/06/01',
                      salary: '$115'
                    },
                    {
                      name: 'Jennifer Acosta',
                      position: 'Junior Javascript Developer',
                      office: 'Edinburgh',
                      age: '43',
                      date: '2013/02/01',
                      salary: '$75'
                    },
                    {
                      name: 'Cara Stevens',
                      position: 'Sales Assistant',
                      office: 'New York',
                      age: '46',
                      date: '2011/12/06',
                      salary: '$145'
                    },
                    {
                      name: 'Hermione Butler',
                      position: 'Regional Director',
                      office: 'London',
                      age: '47',
                      date: '2011/03/21',
                      salary: '$356'
                    },
                    {
                      name: 'Lael Greer',
                      position: 'Systems Administrator',
                      office: 'London',
                      age: '21',
                      date: '2009/02/27',
                      salary: '$103'
                    },
                    {
                      name: 'Jonas Alexander',
                      position: 'Developer',
                      office: 'San Francisco',
                      age: '30',
                      date: '2010/07/14',
                      salary: '$86'
                    },
                    {
                      name: 'Shad Decker',
                      position: 'Regional Director',
                      office: 'Edinburgh',
                      age: '51',
                      date: '2008/11/13',
                      salary: '$183'
                    },
                    {
                      name: 'Michael Bruce',
                      position: 'Javascript Developer',
                      office: 'Singapore',
                      age: '29',
                      date: '2011/06/27',
                      salary: '$183'
                    },
                    {
                      name: 'Donna Snider',
                      position: 'Customer Support',
                      office: 'New York',
                      age: '27',
                      date: '2011/01/25',
                      salary: '$112'
                    }
                  ]
                }
              }
            }
          }
        </script>
      

Material Design example MDB Pro component

Material Design version of datatables uses the same markup as free version, but brings better looking inputs.

Name Position Office Age Start date Salary
Tiger Nixon System Architect Edinburgh 61 2011/04/25 $320,800
Garrett Winters Accountant Tokyo 63 2011/07/25 $170,750
Ashton Cox Junior Technical Author San Francisco 66 2009/01/12 $86,000
Cedric Kelly Senior Javascript Developer Edinburgh 22 2012/03/29 $433,060
Airi Satou Accountant Tokyo 33 2008/11/28 $162,700
Brielle Williamson Integration Specialist New York 61 2012/12/02 $372,000
Herrod Chandler Sales Assistant San Francisco 59 2012/08/06 $137,500
Rhona Davidson Integration Specialist Tokyo 55 2010/10/14 $327,900
Colleen Hurst Javascript Developer San Francisco 39 2009/09/15 $205,500
Sonya Frost Software Engineer Edinburgh 23 2008/12/13 $103,600
Jena Gaines Office Manager London 30 2008/12/19 $90,560
Quinn Flynn Support Lead Edinburgh 22 2013/03/03 $342,000
Charde Marshall Regional Director San Francisco 36 2008/10/16 $470,600
Haley Kennedy Senior Marketing Designer London 43 2012/12/18 $313,500
Tatyana Fitzpatrick Regional Director London 19 2010/03/17 $385,750
Michael Silva Marketing Designer London 66 2012/11/27 $198,500
Paul Byrd Chief Financial Officer (CFO) New York 64 2010/06/09 $725,000
Gloria Little Systems Administrator New York 59 2009/04/10 $237,500
Bradley Greer Software Engineer London 41 2012/10/13 $132,000
Dai Rios Personnel Lead Edinburgh 35 2012/09/26 $217,500
Jenette Caldwell Development Lead New York 30 2011/09/03 $345,000
Yuri Berry Chief Marketing Officer (CMO) New York 40 2009/06/25 $675,000
Caesar Vance Pre-Sales Support New York 21 2011/12/12 $106,450
Doris Wilder Sales Assistant Sidney 23 2010/09/20 $85,600
Angelica Ramos Chief Executive Officer (CEO) London 47 2009/10/09 $1,200,000
Gavin Joyce Developer Edinburgh 42 2010/12/22 $92,575
Jennifer Chang Regional Director Singapore 28 2010/11/14 $357,650
Brenden Wagner Software Engineer San Francisco 28 2011/06/07 $206,850
Fiona Green Chief Operating Officer (COO) San Francisco 48 2010/03/11 $850,000
Shou Itou Regional Marketing Tokyo 20 2011/08/14 $163,000
Michelle House Integration Specialist Sidney 37 2011/06/02 $95,400
Suki Burks Developer London 53 2009/10/22 $114,500
Prescott Bartlett Technical Author London 27 2011/05/07 $145,000
Gavin Cortez Team Leader San Francisco 22 2008/10/26 $235,500
Martena Mccray Post-Sales support Edinburgh 46 2011/03/09 $324,050
Unity Butler Marketing Designer San Francisco 47 2009/12/09 $85,675
Howard Hatfield Office Manager San Francisco 51 2008/12/16 $164,500
Hope Fuentes Secretary San Francisco 41 2010/02/12 $109,850
Vivian Harrell Financial Controller San Francisco 62 2009/02/14 $452,500
Timothy Mooney Office Manager London 37 2008/12/11 $136,200
Jackson Bradshaw Director New York 65 2008/09/26 $645,750
Olivia Liang Support Engineer Singapore 64 2011/02/03 $234,500
Bruno Nash Software Engineer London 38 2011/05/03 $163,500
Sakura Yamamoto Support Engineer Tokyo 37 2009/08/19 $139,575
Thor Walton Developer New York 61 2013/08/11 $98,540
Finn Camacho Support Engineer San Francisco 47 2009/07/07 $87,500
Serge Baldwin Data Coordinator Singapore 64 2012/04/09 $138,575
Zenaida Frank Software Engineer New York 63 2010/01/04 $125,250
Zorita Serrano Software Engineer San Francisco 56 2012/06/01 $115,000
Jennifer Acosta Junior Javascript Developer Edinburgh 43 2013/02/01 $75,650
Cara Stevens Sales Assistant New York 46 2011/12/06 $145,600
Hermione Butler Regional Director London 47 2011/03/21 $356,250
Lael Greer Systems Administrator London 21 2009/02/27 $103,500
Jonas Alexander Developer San Francisco 30 2010/07/14 $86,500
Shad Decker Regional Director Edinburgh 51 2008/11/13 $183,000
Michael Bruce Javascript Developer Singapore 29 2011/06/27 $183,000
Donna Snider Customer Support New York 27 2011/01/25 $112,000
Name Position Office Age Start date Salary

        <template>
          <mdb-datatable
            :data="data"
            striped
            bordered
          />
        </template>
      

        <script>
          import { mdbDatatable } from 'mdbvue';
          export default {
            name: 'DatatablePage',
            components: {
              mdbDatatable
            },
            data() {
              return {
                data: {
                  columns: [
                    {
                      label: 'Name',
                      field: 'name',
                      sort: 'asc'
                    },
                    {
                      label: 'Position',
                      field: 'position',
                      sort: 'asc'
                    },
                    {
                      label: 'Office',
                      field: 'office',
                      sort: 'asc'
                    },
                    {
                      label: 'Age',
                      field: 'age',
                      sort: 'asc'
                    },
                    {
                      label: 'Start date',
                      field: 'date',
                      sort: 'asc'
                    },
                    {
                      label: 'Salary',
                      field: 'salary',
                      sort: 'asc'
                    }
                  ],
                  rows: [
                    {
                      name: 'Tiger Nixon',
                      position: 'System Architect',
                      office: 'Edinburgh',
                      age: '61',
                      date: '2011/04/25',
                      salary: '$320'
                    },
                    {
                      name: 'Garrett Winters',
                      position: 'Accountant',
                      office: 'Tokyo',
                      age: '63',
                      date: '2011/07/25',
                      salary: '$170'
                    },
                    {
                      name: 'Ashton Cox',
                      position: 'Junior Technical Author',
                      office: 'San Francisco',
                      age: '66',
                      date: '2009/01/12',
                      salary: '$86'
                    },
                    {
                      name: 'Cedric Kelly',
                      position: 'Senior Javascript Developer',
                      office: 'Edinburgh',
                      age: '22',
                      date: '2012/03/29',
                      salary: '$433'
                    },
                    {
                      name: 'Airi Satou',
                      position: 'Accountant',
                      office: 'Tokyo',
                      age: '33',
                      date: '2008/11/28',
                      salary: '$162'
                    },
                    {
                      name: 'Brielle Williamson',
                      position: 'Integration Specialist',
                      office: 'New York',
                      age: '61',
                      date: '2012/12/02',
                      salary: '$372'
                    },
                    {
                      name: 'Herrod Chandler',
                      position: 'Sales Assistant',
                      office: 'San Francisco',
                      age: '59',
                      date: '2012/08/06',
                      salary: '$137'
                    },
                    {
                      name: 'Rhona Davidson',
                      position: 'Integration Specialist',
                      office: 'Tokyo',
                      age: '55',
                      date: '2010/10/14',
                      salary: '$327'
                    },
                    {
                      name: 'Colleen Hurst',
                      position: 'Javascript Developer',
                      office: 'San Francisco',
                      age: '39',
                      date: '2009/09/15',
                      salary: '$205'
                    },
                    {
                      name: 'Sonya Frost',
                      position: 'Software Engineer',
                      office: 'Edinburgh',
                      age: '23',
                      date: '2008/12/13',
                      salary: '$103'
                    },
                    {
                      name: 'Jena Gaines',
                      position: 'Office Manager',
                      office: 'London',
                      age: '30',
                      date: '2008/12/19',
                      salary: '$90'
                    },
                    {
                      name: 'Quinn Flynn',
                      position: 'Support Lead',
                      office: 'Edinburgh',
                      age: '22',
                      date: '2013/03/03',
                      salary: '$342'
                    },
                    {
                      name: 'Charde Marshall',
                      position: 'Regional Director',
                      office: 'San Francisco',
                      age: '36',
                      date: '2008/10/16',
                      salary: '$470'
                    },
                    {
                      name: 'Haley Kennedy',
                      position: 'Senior Marketing Designer',
                      office: 'London',
                      age: '43',
                      date: '2012/12/18',
                      salary: '$313'
                    },
                    {
                      name: 'Tatyana Fitzpatrick',
                      position: 'Regional Director',
                      office: 'London',
                      age: '19',
                      date: '2010/03/17',
                      salary: '$385'
                    },
                    {
                      name: 'Michael Silva',
                      position: 'Marketing Designer',
                      office: 'London',
                      age: '66',
                      date: '2012/11/27',
                      salary: '$198'
                    },
                    {
                      name: 'Paul Byrd',
                      position: 'Chief Financial Officer (CFO)',
                      office: 'New York',
                      age: '64',
                      date: '2010/06/09',
                      salary: '$725'
                    },
                    {
                      name: 'Gloria Little',
                      position: 'Systems Administrator',
                      office: 'New York',
                      age: '59',
                      date: '2009/04/10',
                      salary: '$237'
                    },
                    {
                      name: 'Bradley Greer',
                      position: 'Software Engineer',
                      office: 'London',
                      age: '41',
                      date: '2012/10/13',
                      salary: '$132'
                    },
                    {
                      name: 'Dai Rios',
                      position: 'Personnel Lead',
                      office: 'Edinburgh',
                      age: '35',
                      date: '2012/09/26',
                      salary: '$217'
                    },
                    {
                      name: 'Jenette Caldwell',
                      position: 'Development Lead',
                      office: 'New York',
                      age: '30',
                      date: '2011/09/03',
                      salary: '$345'
                    },
                    {
                      name: 'Yuri Berry',
                      position: 'Chief Marketing Officer (CMO)',
                      office: 'New York',
                      age: '40',
                      date: '2009/06/25',
                      salary: '$675'
                    },
                    {
                      name: 'Caesar Vance',
                      position: 'Pre-Sales Support',
                      office: 'New York',
                      age: '21',
                      date: '2011/12/12',
                      salary: '$106'
                    },
                    {
                      name: 'Doris Wilder',
                      position: 'Sales Assistant',
                      office: 'Sidney',
                      age: '23',
                      date: '2010/09/20',
                      salary: '$85'
                    },
                    {
                      name: 'Angelica Ramos',
                      position: 'Chief Executive Officer (CEO)',
                      office: 'London',
                      age: '47',
                      date: '2009/10/09',
                      salary: '$1'
                    },
                    {
                      name: 'Gavin Joyce',
                      position: 'Developer',
                      office: 'Edinburgh',
                      age: '42',
                      date: '2010/12/22',
                      salary: '$92'
                    },
                    {
                      name: 'Jennifer Chang',
                      position: 'Regional Director',
                      office: 'Singapore',
                      age: '28',
                      date: '2010/11/14',
                      salary: '$357'
                    },
                    {
                      name: 'Brenden Wagner',
                      position: 'Software Engineer',
                      office: 'San Francisco',
                      age: '28',
                      date: '2011/06/07',
                      salary: '$206'
                    },
                    {
                      name: 'Fiona Green',
                      position: 'Chief Operating Officer (COO)',
                      office: 'San Francisco',
                      age: '48',
                      date: '2010/03/11',
                      salary: '$850'
                    },
                    {
                      name: 'Shou Itou',
                      position: 'Regional Marketing',
                      office: 'Tokyo',
                      age: '20',
                      date: '2011/08/14',
                      salary: '$163'
                    },
                    {
                      name: 'Michelle House',
                      position: 'Integration Specialist',
                      office: 'Sidney',
                      age: '37',
                      date: '2011/06/02',
                      salary: '$95'
                    },
                    {
                      name: 'Suki Burks',
                      position: 'Developer',
                      office: 'London',
                      age: '53',
                      date: '2009/10/22',
                      salary: '$114'
                    },
                    {
                      name: 'Prescott Bartlett',
                      position: 'Technical Author',
                      office: 'London',
                      age: '27',
                      date: '2011/05/07',
                      salary: '$145'
                    },
                    {
                      name: 'Gavin Cortez',
                      position: 'Team Leader',
                      office: 'San Francisco',
                      age: '22',
                      date: '2008/10/26',
                      salary: '$235'
                    },
                    {
                      name: 'Martena Mccray',
                      position: 'Post-Sales support',
                      office: 'Edinburgh',
                      age: '46',
                      date: '2011/03/09',
                      salary: '$324'
                    },
                    {
                      name: 'Unity Butler',
                      position: 'Marketing Designer',
                      office: 'San Francisco',
                      age: '47',
                      date: '2009/12/09',
                      salary: '$85'
                    },
                    {
                      name: 'Howard Hatfield',
                      position: 'Office Manager',
                      office: 'San Francisco',
                      age: '51',
                      date: '2008/12/16',
                      salary: '$164'
                    },
                    {
                      name: 'Hope Fuentes',
                      position: 'Secretary',
                      office: 'San Francisco',
                      age: '41',
                      date: '2010/02/12',
                      salary: '$109'
                    },
                    {
                      name: 'Vivian Harrell',
                      position: 'Financial Controller',
                      office: 'San Francisco',
                      age: '62',
                      date: '2009/02/14',
                      salary: '$452'
                    },
                    {
                      name: 'Timothy Mooney',
                      position: 'Office Manager',
                      office: 'London',
                      age: '37',
                      date: '2008/12/11',
                      salary: '$136'
                    },
                    {
                      name: 'Jackson Bradshaw',
                      position: 'Director',
                      office: 'New York',
                      age: '65',
                      date: '2008/09/26',
                      salary: '$645'
                    },
                    {
                      name: 'Olivia Liang',
                      position: 'Support Engineer',
                      office: 'Singapore',
                      age: '64',
                      date: '2011/02/03',
                      salary: '$234'
                    },
                    {
                      name: 'Bruno Nash',
                      position: 'Software Engineer',
                      office: 'London',
                      age: '38',
                      date: '2011/05/03',
                      salary: '$163'
                    },
                    {
                      name: 'Sakura Yamamoto',
                      position: 'Support Engineer',
                      office: 'Tokyo',
                      age: '37',
                      date: '2009/08/19',
                      salary: '$139'
                    },
                    {
                      name: 'Thor Walton',
                      position: 'Developer',
                      office: 'New York',
                      age: '61',
                      date: '2013/08/11',
                      salary: '$98'
                    },
                    {
                      name: 'Finn Camacho',
                      position: 'Support Engineer',
                      office: 'San Francisco',
                      age: '47',
                      date: '2009/07/07',
                      salary: '$87'
                    },
                    {
                      name: 'Serge Baldwin',
                      position: 'Data Coordinator',
                      office: 'Singapore',
                      age: '64',
                      date: '2012/04/09',
                      salary: '$138'
                    },
                    {
                      name: 'Zenaida Frank',
                      position: 'Software Engineer',
                      office: 'New York',
                      age: '63',
                      date: '2010/01/04',
                      salary: '$125'
                    },
                    {
                      name: 'Zorita Serrano',
                      position: 'Software Engineer',
                      office: 'San Francisco',
                      age: '56',
                      date: '2012/06/01',
                      salary: '$115'
                    },
                    {
                      name: 'Jennifer Acosta',
                      position: 'Junior Javascript Developer',
                      office: 'Edinburgh',
                      age: '43',
                      date: '2013/02/01',
                      salary: '$75'
                    },
                    {
                      name: 'Cara Stevens',
                      position: 'Sales Assistant',
                      office: 'New York',
                      age: '46',
                      date: '2011/12/06',
                      salary: '$145'
                    },
                    {
                      name: 'Hermione Butler',
                      position: 'Regional Director',
                      office: 'London',
                      age: '47',
                      date: '2011/03/21',
                      salary: '$356'
                    },
                    {
                      name: 'Lael Greer',
                      position: 'Systems Administrator',
                      office: 'London',
                      age: '21',
                      date: '2009/02/27',
                      salary: '$103'
                    },
                    {
                      name: 'Jonas Alexander',
                      position: 'Developer',
                      office: 'San Francisco',
                      age: '30',
                      date: '2010/07/14',
                      salary: '$86'
                    },
                    {
                      name: 'Shad Decker',
                      position: 'Regional Director',
                      office: 'Edinburgh',
                      age: '51',
                      date: '2008/11/13',
                      salary: '$183'
                    },
                    {
                      name: 'Michael Bruce',
                      position: 'Javascript Developer',
                      office: 'Singapore',
                      age: '29',
                      date: '2011/06/27',
                      salary: '$183'
                    },
                    {
                      name: 'Donna Snider',
                      position: 'Customer Support',
                      office: 'New York',
                      age: '27',
                      date: '2011/01/25',
                      salary: '$112'
                    }
                    ]
                }
              }
            }
          }
        </script>  
      

Table Filters

To use filter with Datatables add a special prop with the data column's name, e.g.:
<mdb-datatable :data="data" filter="office" />

For more detailed info and options, see the API tab of this section.


External API example

JSON in the format required by mdb-datatable

The code from the following example will work properly for a JSON following requirements for an object structure described in the API tab.


            <template>
              <mdb-datatable
                :data="'https://YOUR_API'"
                striped
                bordered
                :display="3"
              />
            </template>
          

            <script>
              import { mdbDatatable } from 'mdbvue';
              export default {
                name: 'DatatablePage',
                components: {
                  mdbDatatable
                }
              }
            </script>  
          

Other JSON structures

Sometimes data doesn't follow the required format - in this case you can take an ispiration from the example below:


            <template>
              <mdb-container>
                <mdb-datatable
                  :data="data"
                  striped
                  bordered
                  arrows
                  :display="3"
                />
              </mdb-container>
            </template>
          

            <script>
              import { mdbDatatable, mdbContainer } from 'mdbvue';
              export default {
                components: {
                  mdbDatatable,
                  mdbContainer
                },
                data() {
                  return {
                    columns: [],
                    rows: []
                  };
                },
                computed: {
                  data() {
                    return {
                      columns: this.columns,
                      rows: this.rows
                    };
                  },
                },
                methods: {
                  filterData(dataArr, keys) {
                    let data = dataArr.map(entry => {
                      let filteredEntry = {};
                      keys.forEach(key => {
                        if (key in entry) {
                          filteredEntry[key] = entry[key];
                        }
                      });
                      return filteredEntry;
                    });
                    return data;
                  }
                },
                mounted(){
                  fetch('https://jsonplaceholder.typicode.com/todos')
                    .then(res => res.json())
                    .then(json => {
                      let keys = ["id", "title", "completed"];
                      let entries = this.filterData(json, keys);
                      //columns
                      this.columns = keys.map(key => {
                        return {
                          label: key.toUpperCase(),
                          field: key,
                          sort: 'asc'
                        };
                      });
                      //rows
                      entries.map(entry => this.rows.push(entry));
                    })
                    .catch(err => console.log(err));
                }
              };
            </script>  
          

For more detailed info and options, see the API tab of this section.


Reloading data from API

1. 'refresh' button- add refresh property in order to display a button - your data will reload from API on every click event.


            <template>
              <mdb-container>
                <mdb-datatable
                  data="./https://YOUR_API"
                  striped
                  bordered
                  arrows
                  :display="3"
                  refresh
                />
              </mdb-container>
            </template>
          

            <script>
              import { mdbDatatable, mdbContainer } from 'mdbvue';
              export default {
                components: {
                  mdbDatatable,
                  mdbContainer
                }
              };
            </script>  
          

2. reload data systematically- add reactive property to set an interval function which will reload you data every few seconds. Set "time="2000" to specify time interval in miliseconds.


            <template>
              <mdb-container>
                <mdb-datatable
                  data="./https://YOUR_API"
                  striped
                  bordered
                  arrows
                  :display="3"
                  reactive
                  :time="7000"
                />
              </mdb-container>
            </template>
          

            <script>
              import { mdbDatatable, mdbContainer } from 'mdbvue';
              export default {
                components: {
                  mdbDatatable,
                  mdbContainer
                }
              };
            </script>  
          

Reloading data, either with a button or time interval, is an option available only for the following format of the data property: data="./https://YOUR_API". Remember that this solution requires JSON structure as the one shown in the API tab.


Custom HTML content

Avatar Name Position Website
Murphy Nixon Frontend developer github account
Garrett Winters UI/UX designer portfolio
Sally Cox Javascript developer github account
Cedric Kelly Senior Javascript Developer github account
Airi Satou Marketing Specialist -
Brielle Williamson Graphic designer portfolio
Herrod Chandler CEO

        <template>
          <mdb-datatable
            :data="data"
            bordered
            arrows
            responsive
            autoWidth
            :searching="false"
            headerColor="elegant-color"
            headerWhite
            :pagination="false"
            :tfoot="false"
            :sorting="false"
          />
        </template>
      

        <script>
          import { mdbDatatable } from 'mdbvue';
          export default {
            name: 'DatatablePage',
            components: {
              mdbDatatable
            },
            data: {
              columns: [
                {
                  label: 'Avatar',
                  field: 'avatar',
                  sort: 'asc'
                },
                {
                  label: 'Name',
                  field: 'name',
                  sort: 'asc'
                },
                {
                  label: 'Position',
                  field: 'position',
                  sort: 'asc'
                },
                {
                  label: 'Website',
                  field: 'website',
                  sort: 'asc'
                },
              ],
              rows: [
                {
                  name: 'Murphy Nixon',
                  avatar: '<img class="img-fluid rounded-circle" style="max-width: 80px;" src="https://mdbootstrap.com/img/Photos/Avatars/img%20(10).jpg"/>',
                  website: '<a href="#!" class="indigo-text" >github account</a>',
                  position: 'Frontend developer',
                },
                {
                  name: 'Garrett Winters',
                  avatar: '<img class="img-fluid rounded-circle" style="max-width: 80px;" src="https://mdbootstrap.com/img/Photos/Avatars/img%20%2831%29.jpg"/>',
                  website: '<a href="#!" class="indigo-text" >portfolio</a>',
                  position: 'UI/UX designer',
                },
                {
                  name: 'Sally Cox',
                  avatar: '<img class="img-fluid rounded-circle" style="max-width: 80px;" src="https://mdbootstrap.com/img/Photos/Avatars/img%20(20).jpg"/>',
                  website: '<a href="#!" class="indigo-text" >github account</a>',
                  position: 'Javascript Developer',
                },
                {
                  name: 'Cedric Kelly',
                  avatar: '<img class="img-fluid rounded-circle" style="max-width: 80px;" src="https://mdbootstrap.com/img/Photos/Avatars/img%20(8).jpg"/>',
                  website: '<a href="#!" class="indigo-text" >github account</a>',
                  position: 'Software Engineer',
                },
                {
                  name: 'Airi Satou',
                  avatar: '<img class="img-fluid rounded-circle" style="max-width: 80px;" src="https://mdbootstrap.com/img/Photos/Avatars/img%20(7).jpg"/>',
                  position: 'Marketing Specialist',
                },
                {
                  name: 'Brielle Williamson',
                  avatar: '<img class="img-fluid rounded-circle" style="max-width: 80px;" src="https://mdbootstrap.com/img/Photos/Avatars/img%20(30).jpg"/>',
                  website: '<a href="#!" class="indigo-text" >portfolio</a>',
                  position: 'Graphic Designer',
                },
                {
                  name: 'Herrod Chandler',
                  avatar: '<img class="img-fluid rounded-circle" style="max-width: 80px;" src="https://mdbootstrap.com/img/Photos/Avatars/img%20(3).jpg"/>',
                  position: 'CEO',
                  website: '<button class="btn btn-indigo outline">VISIT OUR WEBSITE</button>'
                },
              ]
            }
          }
        </script>
      

Advanced table options

For advanced options of the tables have a look at specific documentation pages listed below.

Table sort

This functionality lets you sort the data of the tables according to any specific columns.

Table scroll

If your table is too long or too wide you can limit its size and enable scroll functionality.

Table editable

Table editable allows you to edit existing data within the table and add new data to the table.

Edit these docs Rate these docs

Vue Bootstrap Datatables - API

This section present detailed information about Datatables usage, properties and customization. Dive into API references to find see all available props and methods.


Imports

To start working with Datatables you need just one component.
mdbDatatable contains huge amount of options and custom styles (corresponding to static tables).


        import { mdbDatatable } from 'mdbvue';
      

Usage

There are two ways to bind your data into Datatable
You can build an object of structured data, or bind the link to external API (Json from API must have the same structure as object described below).


        <template>
          <mdb-datatable
            :data="data"
            striped
            bordered
          />
        </template>
        
        <script>
        import { mdbDatatable } from 'mdbvue';
        
        export default {
          name: 'DatatablePage',
          components: {
            mdbDatatable
          },
          data() {
            return {
              data: {
                columns: [
                  {
                    label: 'Name',
                    field: 'name',
                    sort: 'asc'
                  },
                  {
                    label: 'Position',
                    field: 'position',
                    sort: 'asc'
                  },
                  {
                    label: 'Office',
                    field: 'office',
                    sort: 'asc'
                  },
                  {
                    label: 'Age',
                    field: 'age',
                    sort: 'asc'
                  },
                  {
                    label: 'Start date',
                    field: 'date',
                    sort: 'asc'
                  },
                  {
                    label: 'Salary',
                    field: 'salary',
                    sort: 'asc'
                  }
                ],
                rows: [
                  {
                    name: 'Tiger Nixon',
                    position: 'System Architect',
                    office: 'Edinburgh',
                    age: '61',
                    date: '2011/04/25',
                    salary: '$320'
                  },
                  {
                    name: 'Garrett Winters',
                    position: 'Accountant',
                    office: 'Tokyo',
                    age: '63',
                    date: '2011/07/25',
                    salary: '$170'
                  },
                  {
                    name: 'Ashton Cox',
                    position: 'Junior Technical Author',
                    office: 'San Francisco',
                    age: '66',
                    date: '2009/01/12',
                    salary: '$86'
                  },
                  {
                    name: 'Cedric Kelly',
                    position: 'Senior Javascript Developer',
                    office: 'Edinburgh',
                    age: '22',
                    date: '2012/03/29',
                    salary: '$433'
                  },
                  {
                    name: 'Airi Satou',
                    position: 'Accountant',
                    office: 'Tokyo',
                    age: '33',
                    date: '2008/11/28',
                    salary: '$162'
                  },
                  {
                    name: 'Brielle Williamson',
                    position: 'Integration Specialist',
                    office: 'New York',
                    age: '61',
                    date: '2012/12/02',
                    salary: '$372'
                  },
                  {
                    name: 'Herrod Chandler',
                    position: 'Sales Assistant',
                    office: 'San Francisco',
                    age: '59',
                    date: '2012/08/06',
                    salary: '$137'
                  },
                  {
                    name: 'Rhona Davidson',
                    position: 'Integration Specialist',
                    office: 'Tokyo',
                    age: '55',
                    date: '2010/10/14',
                    salary: '$327'
                  },
                  {
                    name: 'Colleen Hurst',
                    position: 'Javascript Developer',
                    office: 'San Francisco',
                    age: '39',
                    date: '2009/09/15',
                    salary: '$205'
                  },
                  {
                    name: 'Sonya Frost',
                    position: 'Software Engineer',
                    office: 'Edinburgh',
                    age: '23',
                    date: '2008/12/13',
                    salary: '$103'
                  },
                  {
                    name: 'Jena Gaines',
                    position: 'Office Manager',
                    office: 'London',
                    age: '30',
                    date: '2008/12/19',
                    salary: '$90'
                  },
                  {
                    name: 'Quinn Flynn',
                    position: 'Support Lead',
                    office: 'Edinburgh',
                    age: '22',
                    date: '2013/03/03',
                    salary: '$342'
                  },
                  {
                    name: 'Charde Marshall',
                    position: 'Regional Director',
                    office: 'San Francisco',
                    age: '36',
                    date: '2008/10/16',
                    salary: '$470'
                  },
                  {
                    name: 'Haley Kennedy',
                    position: 'Senior Marketing Designer',
                    office: 'London',
                    age: '43',
                    date: '2012/12/18',
                    salary: '$313'
                  },
                  {
                    name: 'Tatyana Fitzpatrick',
                    position: 'Regional Director',
                    office: 'London',
                    age: '19',
                    date: '2010/03/17',
                    salary: '$385'
                  },
                  {
                    name: 'Michael Silva',
                    position: 'Marketing Designer',
                    office: 'London',
                    age: '66',
                    date: '2012/11/27',
                    salary: '$198'
                  },
                  {
                    name: 'Paul Byrd',
                    position: 'Chief Financial Officer (CFO)',
                    office: 'New York',
                    age: '64',
                    date: '2010/06/09',
                    salary: '$725'
                  },
                  {
                    name: 'Gloria Little',
                    position: 'Systems Administrator',
                    office: 'New York',
                    age: '59',
                    date: '2009/04/10',
                    salary: '$237'
                  },
                  {
                    name: 'Bradley Greer',
                    position: 'Software Engineer',
                    office: 'London',
                    age: '41',
                    date: '2012/10/13',
                    salary: '$132'
                  },
                  {
                    name: 'Dai Rios',
                    position: 'Personnel Lead',
                    office: 'Edinburgh',
                    age: '35',
                    date: '2012/09/26',
                    salary: '$217'
                  },
                  {
                    name: 'Jenette Caldwell',
                    position: 'Development Lead',
                    office: 'New York',
                    age: '30',
                    date: '2011/09/03',
                    salary: '$345'
                  },
                  {
                    name: 'Yuri Berry',
                    position: 'Chief Marketing Officer (CMO)',
                    office: 'New York',
                    age: '40',
                    date: '2009/06/25',
                    salary: '$675'
                  },
                  {
                    name: 'Caesar Vance',
                    position: 'Pre-Sales Support',
                    office: 'New York',
                    age: '21',
                    date: '2011/12/12',
                    salary: '$106'
                  },
                  {
                    name: 'Doris Wilder',
                    position: 'Sales Assistant',
                    office: 'Sidney',
                    age: '23',
                    date: '2010/09/20',
                    salary: '$85'
                  },
                  {
                    name: 'Angelica Ramos',
                    position: 'Chief Executive Officer (CEO)',
                    office: 'London',
                    age: '47',
                    date: '2009/10/09',
                    salary: '$1'
                  },
                  {
                    name: 'Gavin Joyce',
                    position: 'Developer',
                    office: 'Edinburgh',
                    age: '42',
                    date: '2010/12/22',
                    salary: '$92'
                  },
                  {
                    name: 'Jennifer Chang',
                    position: 'Regional Director',
                    office: 'Singapore',
                    age: '28',
                    date: '2010/11/14',
                    salary: '$357'
                  },
                  {
                    name: 'Brenden Wagner',
                    position: 'Software Engineer',
                    office: 'San Francisco',
                    age: '28',
                    date: '2011/06/07',
                    salary: '$206'
                  },
                  {
                    name: 'Fiona Green',
                    position: 'Chief Operating Officer (COO)',
                    office: 'San Francisco',
                    age: '48',
                    date: '2010/03/11',
                    salary: '$850'
                  },
                  {
                    name: 'Shou Itou',
                    position: 'Regional Marketing',
                    office: 'Tokyo',
                    age: '20',
                    date: '2011/08/14',
                    salary: '$163'
                  },
                  {
                    name: 'Michelle House',
                    position: 'Integration Specialist',
                    office: 'Sidney',
                    age: '37',
                    date: '2011/06/02',
                    salary: '$95'
                  },
                  {
                    name: 'Suki Burks',
                    position: 'Developer',
                    office: 'London',
                    age: '53',
                    date: '2009/10/22',
                    salary: '$114'
                  },
                  {
                    name: 'Prescott Bartlett',
                    position: 'Technical Author',
                    office: 'London',
                    age: '27',
                    date: '2011/05/07',
                    salary: '$145'
                  },
                  {
                    name: 'Gavin Cortez',
                    position: 'Team Leader',
                    office: 'San Francisco',
                    age: '22',
                    date: '2008/10/26',
                    salary: '$235'
                  },
                  {
                    name: 'Martena Mccray',
                    position: 'Post-Sales support',
                    office: 'Edinburgh',
                    age: '46',
                    date: '2011/03/09',
                    salary: '$324'
                  },
                  {
                    name: 'Unity Butler',
                    position: 'Marketing Designer',
                    office: 'San Francisco',
                    age: '47',
                    date: '2009/12/09',
                    salary: '$85'
                  },
                  {
                    name: 'Howard Hatfield',
                    position: 'Office Manager',
                    office: 'San Francisco',
                    age: '51',
                    date: '2008/12/16',
                    salary: '$164'
                  },
                  {
                    name: 'Hope Fuentes',
                    position: 'Secretary',
                    office: 'San Francisco',
                    age: '41',
                    date: '2010/02/12',
                    salary: '$109'
                  },
                  {
                    name: 'Vivian Harrell',
                    position: 'Financial Controller',
                    office: 'San Francisco',
                    age: '62',
                    date: '2009/02/14',
                    salary: '$452'
                  },
                  {
                    name: 'Timothy Mooney',
                    position: 'Office Manager',
                    office: 'London',
                    age: '37',
                    date: '2008/12/11',
                    salary: '$136'
                  },
                  {
                    name: 'Jackson Bradshaw',
                    position: 'Director',
                    office: 'New York',
                    age: '65',
                    date: '2008/09/26',
                    salary: '$645'
                  },
                  {
                    name: 'Olivia Liang',
                    position: 'Support Engineer',
                    office: 'Singapore',
                    age: '64',
                    date: '2011/02/03',
                    salary: '$234'
                  },
                  {
                    name: 'Bruno Nash',
                    position: 'Software Engineer',
                    office: 'London',
                    age: '38',
                    date: '2011/05/03',
                    salary: '$163'
                  },
                  {
                    name: 'Sakura Yamamoto',
                    position: 'Support Engineer',
                    office: 'Tokyo',
                    age: '37',
                    date: '2009/08/19',
                    salary: '$139'
                  },
                  {
                    name: 'Thor Walton',
                    position: 'Developer',
                    office: 'New York',
                    age: '61',
                    date: '2013/08/11',
                    salary: '$98'
                  },
                  {
                    name: 'Finn Camacho',
                    position: 'Support Engineer',
                    office: 'San Francisco',
                    age: '47',
                    date: '2009/07/07',
                    salary: '$87'
                  },
                  {
                    name: 'Serge Baldwin',
                    position: 'Data Coordinator',
                    office: 'Singapore',
                    age: '64',
                    date: '2012/04/09',
                    salary: '$138'
                  },
                  {
                    name: 'Zenaida Frank',
                    position: 'Software Engineer',
                    office: 'New York',
                    age: '63',
                    date: '2010/01/04',
                    salary: '$125'
                  },
                  {
                    name: 'Zorita Serrano',
                    position: 'Software Engineer',
                    office: 'San Francisco',
                    age: '56',
                    date: '2012/06/01',
                    salary: '$115'
                  },
                  {
                    name: 'Jennifer Acosta',
                    position: 'Junior Javascript Developer',
                    office: 'Edinburgh',
                    age: '43',
                    date: '2013/02/01',
                    salary: '$75'
                  },
                  {
                    name: 'Cara Stevens',
                    position: 'Sales Assistant',
                    office: 'New York',
                    age: '46',
                    date: '2011/12/06',
                    salary: '$145'
                  },
                  {
                    name: 'Hermione Butler',
                    position: 'Regional Director',
                    office: 'London',
                    age: '47',
                    date: '2011/03/21',
                    salary: '$356'
                  },
                  {
                    name: 'Lael Greer',
                    position: 'Systems Administrator',
                    office: 'London',
                    age: '21',
                    date: '2009/02/27',
                    salary: '$103'
                  },
                  {
                    name: 'Jonas Alexander',
                    position: 'Developer',
                    office: 'San Francisco',
                    age: '30',
                    date: '2010/07/14',
                    salary: '$86'
                  },
                  {
                    name: 'Shad Decker',
                    position: 'Regional Director',
                    office: 'Edinburgh',
                    age: '51',
                    date: '2008/11/13',
                    salary: '$183'
                  },
                  {
                    name: 'Michael Bruce',
                    position: 'Javascript Developer',
                    office: 'Singapore',
                    age: '29',
                    date: '2011/06/27',
                    salary: '$183'
                  },
                  {
                    name: 'Donna Snider',
                    position: 'Customer Support',
                    office: 'New York',
                    age: '27',
                    date: '2011/01/25',
                    salary: '$112'
                  }
                ]
              }
            }
          }
        };
        </script>
        
        <style>

        </style>
      

        <template>
          <mdb-datatable
            data="https://YOUR_API_URL"
            striped
            bordered
          />
        </template>
        
        <script>
        import { mdbDatatable } from 'mdbvue';
        
        export default {
          name: 'DatatablePage',
          components: {
            mdbDatatable
          }
        };
        </script>
      

        data = {
          columns: [
            {
              label: String (displayed column label),
              field: String (corresponding key for cells),
              sort: String (Optional, 'asc'/'desc', describes the initial sorting direcotry),
            }
          ],
          rows: [
            {
              field: String (corresponds column's field, contains cell data),
              field: String,
              field: String,
              ...
            }
          ]
        }
      

API Reference

All properties and options refered to mdb-datatable component.

Name Type Default Description Example
sorting Boolean true Determines whether sorting is enabled/disabled. <mdb-datatable striped>
order String[] Sets initial order. Accepts array of strings, index 0: table field by which you want to sort, index 1: sorting direction ('desc'/'asc'). <mdb-datatable order="['age', 'desc']">
searching Boolean true Determines whether searching is enabled/disabled. <mdb-datatable searching="false">
pagination Boolean true Determines whether pagination is enabled/disabled. <mdb-datatable pagination="false">
scrollY Boolean false Allows table to be scrolled vertically if it's content is higher than 200px. Combine it with maxHeight to manipulate table's height. <mdb-datatable scrollY>
maxHeight String 200px Sets table's maxHeight. You can use px, vh or whatever fits to your needs. <mdb-datatable maxHeight="400px">
striped Boolean false Adds zebra-striping to any table row. <mdb-datatable striped>
bordered Boolean false Adds border on all table's and cell's sides. <mdb-datatable bordered>
borderless Boolean false Disables border on all table's and cell's sides. <mdb-datatable borderless>
hover Boolean false Adds hover state on table rows (rows are marked on light-grey color). <mdb-datatable hover>
small Boolean false Cuts cell's padding by half. <mdb-datatable small>
reponsive Boolean false Makes table scrollable horizontally when screen width is smaller than table content (under 768px).
It make use of overflow-y: hidden which clips off content that goes beyon the bottom or top edge of the table.
<mdb-datatable responsive>
reponsiveSm Boolean false Makes table scrollable horizontally on under 576px wide screens. <mdb-datatable responsiveSm>
reponsiveMd Boolean false Makes table scrollable horizontally on under 768px wide screens. <mdb-datatable responsiveMd>
reponsiveLg Boolean false Makes table scrollable horizontally on under 992px wide screens. <mdb-datatable responsiveLg>
reponsiveXl Boolean false Makes table scrollable horizontally on under 1200px wide screens. <mdb-datatable responsiveXl>
autoWidth Boolean false Automatically adjust columns width to the content. <mdb-datatable autoWidth>
filter String Adds a new select to filter table data by column name. <mdb-datatable filter="office" >
fixed Boolean false Sets fixed columns width. <mdb-datatable fixed>
arrows Boolean false Replaces 'Next', 'Previous', 'Start' and 'End' in the pagination with mdb-icons. <mdb-datatable arrows>
start String 'Start' Replaces 'Start' in the pagination with the custom text. <mdb-datatable start="<<">
end String "End" Replaces 'End' in the pagination with the custom text. <mdb-datatable end=">>">
next String "Next" Replaces 'Next' in the pagination with the custom text. <mdb-datatable next=">">
previous String "Previous" Replaces 'Previous' in the pagination with the custom text. <mdb-datatable previous="<">
display Number 5 Specifies maximum number of pages displayed in the pagination. <mdb-datatable :display="7">
defaultRow String '-' Specifies default value for the missing piece of data. <mdb-datatable defaultRow="missing data">
defaultCol String 'undefined' Specifies default value for the column header - for example when one of the elements in the columns array is null <mdb-datatable defaultCol="default header">
tfoot Boolean true Determines if table's footer should be visible. <mdb-datatable :tfoot="false">
refresh Boolean false If set to true, 'refresh' button will be shown. To refresh content data property has to be in following format: data="./https://YOUR_API" <mdb-datatable data="./https://YOUR_API" refresh>
reactive Boolean false Triggers reloading data every 5 seconds (you can change this value with time property. To reload content data property has to be in following format: data="./https://YOUR_API" <mdb-datatable data="./https://YOUR_API" reactive>
time Number 5000 Sets time interval for reloading reactive data . <mdb-datatable data="./https://YOUR_API" reactive :time="3000">
searchPlaceholder String "Search" Changes placeholder in Search input to custom text <mdb-datatable searchPlaceholder="..." >
entriesTitle String "Show entries" Changes title next to select with number of entries to custom text <mdb-datatable entriesTitle="..." >
noFoundMessage String "No matching records found" Allows to display custom message informing user about lack of data <mdb-datatable noFoundMessage="..." >
showingText String "Showing" Allows to resplace 'Showing: ... " with different word <mdb-datatable showingText="..." >
focus Boolean false Allows to select the entry. <mdb-datatable focus >

- property available only for PRO users.

API Reference: Events

Event Description Example
@selectRow If property focus is set to true, it emits the index of the selected row. <mdb-datatable focus @selectRow="handler" />