Data Table Scrolling
Inkline's Data Table supports a large number of columns easily using horizontal scrolling and sticky columns.
export default {
data() {
return {
columns: [
{ title: 'Name', path: 'name' },
{ title: 'Position', path: 'position' },
{ title: 'Age', path: 'age' },
{ title: 'City', path: 'address.city' },
{ title: 'Country', path: 'address.country' },
{ title: 'Email', path: 'email' }
],
rows: [ ... ]
}
}
}
By default, sorting for the string
, number
and Date
value types is supported natively.
Data Table Default Scrolling
Show entries
10
25
50
100
# | Name | Position | Age | City | Country | |
---|---|---|---|---|---|---|
1 | Richard Hendricks | Chief Executive Officer | 26 | Cupertino | United States | richard.hendricks@email.com |
2 | Bertram Gilfoyle | System Administrator | 30 | Toronto | Canada | bertram.gilfoyle@email.com |
3 | Dinesh Chugtai | Software Developer | 30 | Lahore | Pakistan | dinesh.chugtai@email.com |
4 | Jared Dunn | Chief Operations Officer | 35 | Berlin | Germany | jared.dunn@email.com |
5 | Erlich Bachman | Software Developer | 32 | Palo Alto | United States | erlich.bachman@email.com |
6 | Nelson Bighetti | Software Developer | 26 | Stanford | United States | nelson.bighetti@email.com |
7 | Richard Hendricks | Chief Executive Officer | 26 | Cupertino | United States | richard.hendricks@email.com |
8 | Bertram Gilfoyle | System Administrator | 30 | Toronto | Canada | bertram.gilfoyle@email.com |
9 | Dinesh Chugtai | Software Developer | 30 | Lahore | Pakistan | dinesh.chugtai@email.com |
10 | Jared Dunn | Chief Operations Officer | 35 | Berlin | Germany | jared.dunn@email.com |
# | Name | Position | Age | City | Country |
Showing 1 to 10 of 25 entries
- <
- 1
- 2
- 3
- >
<i-datatable :columns="columns" :rows="rows" nowrap />
export default {
data() {
return {
columns: [
{ title: 'Name', path: 'name' },
{ title: 'Position', path: 'position' },
{ title: 'Age', path: 'age' },
{ title: 'City', path: 'address.city' },
{ title: 'Country', path: 'address.country' },
{ title: 'Email', path: 'email' }
],
rows: [
{ id: '1', name: 'Richard Hendricks', email: 'richard.hendricks@email.com', age: 26, address: { city: 'Cupertino', country: 'United States' }, position: 'Chief Executive Officer' },
{ id: '2', name: 'Bertram Gilfoyle', email: 'bertram.gilfoyle@email.com', age: 30, address: { city: 'Toronto', country: 'Canada' }, position: 'System Administrator' },
{ id: '3', name: 'Dinesh Chugtai', email: 'dinesh.chugtai@email.com', age: 30, address: { city: 'Lahore', country: 'Pakistan' }, position: 'Software Developer' },
...
]
}
}
}
Sticky Columns
By setting the sticky
column property to true
, you can easily make columns stick while scrolling horizontally.
export default {
data() {
return {
columns: [
{ title: 'Name', path: 'name', sticky: true },
{ title: 'Email', path: 'email' },
{ title: 'Age', path: 'age' },
...
],
rows: [ ... ]
}
}
}
Data Table Default Scrolling
Show entries
10
25
50
100
# | Name | Position | Age | City | Country | |
---|---|---|---|---|---|---|
1 | Richard Hendricks | Chief Executive Officer | 26 | Cupertino | United States | richard.hendricks@email.com |
2 | Bertram Gilfoyle | System Administrator | 30 | Toronto | Canada | bertram.gilfoyle@email.com |
3 | Dinesh Chugtai | Software Developer | 30 | Lahore | Pakistan | dinesh.chugtai@email.com |
4 | Jared Dunn | Chief Operations Officer | 35 | Berlin | Germany | jared.dunn@email.com |
5 | Erlich Bachman | Software Developer | 32 | Palo Alto | United States | erlich.bachman@email.com |
6 | Nelson Bighetti | Software Developer | 26 | Stanford | United States | nelson.bighetti@email.com |
7 | Richard Hendricks | Chief Executive Officer | 26 | Cupertino | United States | richard.hendricks@email.com |
8 | Bertram Gilfoyle | System Administrator | 30 | Toronto | Canada | bertram.gilfoyle@email.com |
9 | Dinesh Chugtai | Software Developer | 30 | Lahore | Pakistan | dinesh.chugtai@email.com |
10 | Jared Dunn | Chief Operations Officer | 35 | Berlin | Germany | jared.dunn@email.com |
# | Name | Position | Age | City | Country |
Showing 1 to 10 of 25 entries
- <
- 1
- 2
- 3
- >
<i-datatable :columns="columns" :rows="rows" :count-column="countColumn" nowrap />
export default {
data() {
return {
columns: [
{ title: 'Name', path: 'name', sticky: true },
{ title: 'Email', path: 'email' },
{ title: 'Age', path: 'age' },
...
],
rows: [
{ id: '1', name: 'Richard Hendricks', email: 'richard.hendricks@email.com', age: 26 },
{ id: '2', name: 'Bertram Gilfoyle', email: 'bertram.gilfoyle@email.com', age: 30 },
{ id: '3', name: 'Dinesh Chugtai', email: 'dinesh.chugtai@email.com', age: 30 },
{ id: '4', name: 'Jared Dunn', email: 'jared.dunn@email.com', age: 35 },
{ id: '5', name: 'Erlich Bachman', email: 'erlich.bachman@email.com', age: 32 }
]
}
}
}