GeoTable Ready 10.1.0+

GeoTable is a component designed to display large amounts of tabular data in a table environment, supporting pagination and sorting.

Properties

Prop name Type Default value Description
sourceData array Show description
forcedPageSize number Show description
automaticPageSize boolean Show description
currentPage number Show description

Events

Name Type Description
go-to-page Number User wanted to change current page.
column-width-changed number Event emitted when autosize algorithm finishes running.

Slots

Name Description
header

Use this slot to customize table’s headers

empty

Use this slot to customize what’s displayed when table has no data

body

Use this slot to customize how each data item is rendered

Use this slot to customize table’s footer and pagination

footerLeadingAccessoryItem

Use this slot to add leading accessories to table’s footer without having to add pagination explicitly

footerTrailingAccessoryItem

Use this slot to add trailing accessories to table’s footer without having to add pagination explicitly

Constants

Name Value
DEFAULT_PAGESIZE Show definition

Examples

Static table

Name
Allegiance
Obi-Wan Kenobi
Republic, democracy
Anakin Skywalker
Republic
Sheev Palpatine
The Senate
Darth Sidious
The Senate
Darth Vader
Galactic Empire
Luke Skywalker
Rebel Alliance
Leia Organa
Rebel Alliance

Table with dynamic data

Column 0
Column 1
Column 2
Column 3
Column 4
93.25947824068666
86.8960510375778
92.48865675472177
77.01219281148262
68.1521598067431
19.91253316652135
28.54920428210075
37.76843674717212
13.028705534002881
69.87991272795652
86.51664623862743
31.38368426741136
29.98257586390869
84.95727507023088
60.26022508605633
69.89927225671677
75.32423624677615
83.63371660222636
64.83199238828992
55.43042412111989
96.70506564691482
98.07665950610857
79.11761729222297
79.36599229948591
61.57792341045622
42.606928740171554
81.59978540280781
26.486587441784337
39.73875001836817
49.3136566269083
30.364433966805503
50.26939749750785
11.204085575807298
20.865889333957167
89.7201156438225
14.161967696615442
89.58906106247522
32.67867056130327
44.96153322561123
1.6140597203819773
59.233413664919674
56.12211077735645
80.94152131630152
11.90802300803897
18.3621763383387
32.893292852024004
73.35813944208043
24.06036641464995
30.036017797813884
3.013461399412476
Randomize data

Headers

GeoTable instances need a least one header row, which can have as many cells as required. Header rows can be set up using header named slot. To set up a header row, put a GeoTableHeaderRow component as content of header named slot.

Multiple header rows

It is possible to show multiple header rows in a single table.

Name
Allegiance
Copy column
Group by this column
Obi-Wan Kenobi
Republic, democracy
Anakin Skywalker
Republic
Sheev Palpatine
The Senate
Darth Sidious
The Senate
Darth Vader
Galactic Empire
Luke Skywalker
Rebel Alliance
Leia Organa
Rebel Alliance

Customizing column's width

It is possible to set up a minimum, maximum and a forced width. This is applied on per-header-cell basis. When setting a header cell's columnMinWidth, column's final width won't be smaller than it. If there's a columnMaxWidth, column's final width won't exceed it.

If columnWidth is set then it will override any minimum or maximum width set.

By default columns will take the width needed to render their content in a single line, considering both, header and body content. However, you can make header cells opt out from this behaviour with property ignoreContentWidth.

To opt out of GeoTable automatic growing for some column, set property growingDisabled to true.

Min width
Max width
Fixed size
Not growing
124954
872141
182186
290203
954201
Randomize data

Body

You'll usually want to display not only headers but also some data in table's body. Similar to headers, GeoTable has a body named slot just for that. However, there's an important difference: GeoTable will handle pagination automatically so instead of rendering one row per item you should render just one row, which will be used as template for all the rows being rendered.

Under the hood GeoTable is using Scoped Slots (opens new window) for that. The object passed to the scoped slot has the following shape:

  • item - a single entry of sourceData array, the one being rendered at the time.
  • index - the row number of the item being rendered. Note that this index is relative to the beginning of currently displayed page, not the absolute position of the item in sourceData.

Examples

Random data

Column 0
Column 1
Column 2
Column 3
12.131797144536783
83.71332370273583
77.91942424261036
82.7041358948748
85.79557907711029
89.87994110461128
97.31439075742483
24.866654008077415
50.21218388501727
66.05056627689359
36.12841916635905
46.94586458025716
87.94681753346245
52.217687510628295
25.494720312005082
29.96109166896659
24.972107359425742
45.3337672783596
97.86609045293693
83.9623611634356
72.11845614502646
84.05927090775403
34.90916746390966
44.39591168339643
32.590001616225805
53.144462908257964
99.35760671387645
68.03613717126191
48.62915243589383
92.99343930550006
85.86408242738077
38.86610672936739
73.8289001253111
67.37051541137427
28.710142897035084
64.76354900578957
84.59173684140507
49.88806261460501
97.44494400465081
47.43912218597195
Randomize data

Narrow table

Column 0
Column 1
47
90
33
75
62
1
9
52
30
66
39
90
6
98
35
49
47
36
93
3
Randomize data

Wide table

Column 0
Column 1
Column 2
Column 3
Column 4
92.39293179501051
60.5854824030134
98.84591747913764
92.05314580852075
97.71717696198488
7.716727361760589
73.3385005197729
98.84744088392246
66.15409776153078
79.07373449925095
84.84069975211115
99.22358902982896
0.9525316422321239
67.89578579541387
74.17225922721484
84.82700330670747
51.06408477019511
38.30722838179792
90.16475707654618
43.98673718533372
13.436230466436205
39.79385155868271
70.68277538207263
92.59044212042176
99.85396444587597
75.64972429565697
24.92574461626862
88.05881883179056
75.93116894190885
22.91308760836266
71.27117285238637
61.30056456634263
2.226843646122867
44.016109869831865
0.8385475362401973
90.40444595241675
43.179935764223586
70.65147446618359
63.477605247409905
63.571211177717316
42.285185144042316
51.34463671408602
45.582408993806766
56.71785357176062
48.102648493386454
74.26367197387285
66.0643389518469
51.74977274003607
3.1785147858180984
70.6419136633579
Randomize data

Customizable-width table

Column 0
Column 1
Column 2
Column 3
46
45
30
31
72
5
13
67
2
21
53
38
43
73
7
2
21
71
53
58
28
95
95
37
66
92
76
36
9
47
40
77
62
1
78
54
31
66
84
46
Randomize data

Empty state

If table has no content to be displayed, its empty slot will be rendered. You can use that slot to easily show an empty state for any table.

Table is empty!

Pagination

You can use GeoTablePagination to add pagination behaviour to a GeoTable.

By default GeoTable will display up to 10 rows of data. You can override this with a different value using forced-page-size property. Additionally, GeoTable can infer the amount of rows to be displayed if you prefer so. Setting automatic-page-size property to true will opt in to this feature.

Examples

Default page size

Column 0
Column 1
Column 2
Column 3
Column 4
0
151
133
106
111
1
277
216
203
21
2
85
49
139
161
3
167
52
201
53
4
151
180
155
178
5
84
155
211
19
6
141
80
50
143
7
14
161
269
19
8
264
142
66
189
9
75
33
196
116
Remove rows
Add row

Start animation

Automatic page size

Column 0
Column 1
Column 2
Column 3
Column 4
0
185
80
110
89
1
122
277
88
98
2
125
49
183
33
3
206
175
257
22
4
173
233
75
35
5
112
115
180
254
6
118
299
178
269
7
283
57
192
275
8
157
188
56
282
9
170
270
33
94
10
87
58
179
110
11
77
41
143
62
12
13
148
77
186
13
296
71
242
159
14
211
258
56
164
15
21
150
59
100
16
112
23
77
195
17
130
87
290
18
18
231
226
290
46
19
77
94
124
60
20
251
21
28
52
21
9
138
192
36
22
55
230
47
288
23
250
27
219
83
24
144
129
41
299
25
158
287
19
20
26
173
176
133
48
Remove rows
Add row
Inferred page size: 27

Start animation

Sorting

You can use GeoTableSort to add sorting behaviour to GeoTable.

Column 0
Column 1
Column 2
Column 3
Column 4
3
65
91
92
55
7
38
92
25
3
10
39
9
84
11
18
94
2
76
97
20
21
53
42
69
31
20
56
54
57
38
53
70
24
80
39
16
20
19
25
49
28
53
26
23
51
50
0
1
49
Randomize data
Reset sorting