This repository has been archived by the owner on Jan 31, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
polymer-datatables.html
142 lines (101 loc) · 3.61 KB
/
polymer-datatables.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<!--
@element polymer-datatables
@author designbyraychou
@homepage https://github.com/the-control-group/polymer-datatables
**This element is compatible with Polymer 0.5.**
__Example:__
```
<polymer-datatables-table
data="{{ data }}"
tableApi="{{ tableApi }}"
perPage="{{ perPage }}"
columns="{{ columns }}"
perPageCount="{{ perPageCount }}"
filters="{{ filters }}"
pageTotal="{{ pageTotal }}"
resultTotal="{{ resultTotal }}"
currentPage="{{ currentPage }}"></polymer-datatables-table>
<polymer-datatables-filter
tableApi="{{ tableApi }}"
column="position"
columns="{{ columns }}"
filters="{{ filters }}"></polymer-datatables-filter>
<polymer-datatables-search
tableApi="{{ tableApi }}"></polymer-datatables-search>
<polymer-datatables-pages
perPage="{{ perPage }}"
perPageCount="{{ perPageCount }}"
pageTotal="{{ pageTotal }}"
currentPage="{{ currentPage }}"></polymer-datatables-pages>
<polymer-datatables-perpage-selector
perPage="{{ perPage }}"
perPageCount="{{ perPageCount }}"
pageTotal="{{ pageTotal }}"
currentPage="{{ currentPage }}"></polymer-datatables-perpage-selector>
<polymer-datatables-result-range
data="{{ data }}"
perPage="{{ perPage }}"
resultTotal="{{ resultTotal }}"
perPageCount="{{ perPageCount }}"
currentPage="{{ currentPage }}"></polymer-datatables-result-range>
<polymer-datatables-previous
tableApi="{{ tableApi }}"
pageTotal="{{ pageTotal }}"
currentPage="{{ currentPage }}">Previous</polymer-datatables-previous>
<polymer-datatables-next
tableApi="{{ tableApi }}"
pageTotal="{{ pageTotal }}"
currentPage="{{ currentPage }}">Next</polymer-datatables-next>
<polymer-datatables-export-csv
filename="csv"
columns="{{ columns }}"
data="{{ data }}">Export</polymer-datatables-export-csv>
```
# Elements
#### `<polymer-datatables-table>`
Creates datatable
#### `<polymer-datatables-filter>`
Creates datatable filters
#### `<polymer-datatables-search>`
Creates datatable searchbox
#### `<polymer-datatables-pages>`
Created pagination
#### `<polymer-datatables-perpage-selector>`
Creates dropdown to select records per page
#### `<polymer-datatables-result-range>`
Creates current page count. Ex. '1-25 of 50'
#### `<polymer-datatables-previous>`
Creates button to go to the previous page
#### `<polymer-datatables-next>`
Creates button to go to the next page
#### `<polymer-datatables-export-csv>`
Creates button download CSV for all data
# Attributes
#### `data`
An array of data.
#### `tableApi`
An object returned from the polymer-datatables-table for using datatables api.
#### `perPage`
Records shown per page.
#### `columns`
Array representing the table header.
#### `perPageCount`
Array for the options in 'Rows Per Page' dropdown.
#### `filters`
Object returned from datatables
#### `pageTotal`
Returns total number of pages
#### `resultTotal`
Return total number of records
#### `currentPage`
Return number for current page.
-->
<link rel="import" href="polymer-datatables-export-csv.html">
<link rel="import" href="polymer-datatables-filter.html">
<link rel="import" href="polymer-datatables-next.html">
<link rel="import" href="polymer-datatables-pages.html">
<link rel="import" href="polymer-datatables-perpage-selector.html">
<link rel="import" href="polymer-datatables-previous.html">
<link rel="import" href="polymer-datatables-result-range.html">
<link rel="import" href="polymer-datatables-search.html">
<link rel="import" href="polymer-datatables-table.html">