Skip to content

Commit 42e700d

Browse files
committed
Update README.md
1 parent 02d042d commit 42e700d

File tree

1 file changed

+99
-100
lines changed

1 file changed

+99
-100
lines changed

README.md

+99-100
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ $ npm install nested-datatables
1919
### Usage
2020

2121
```js
22-
var table = new nestedTables.TableHierarchy('example', data, settings);
22+
var table = new nestedTables.TableHierarchy("example", data, settings);
2323
table.initializeTableHierarchy();
2424
```
2525

@@ -61,8 +61,8 @@ Triggered when a child hierarchy is shown
6161

6262
```js
6363
// '#example' is wrapper ID for table hierarchy
64-
var tableEle = document.querySelector('#example .table');
65-
tableEle.addEventListener('onShowChildHierarchy', function(e) {
64+
var tableEle = document.querySelector("#example .table");
65+
tableEle.addEventListener("onShowChildHierarchy", function (e) {
6666
console.log(e);
6767
});
6868
```
@@ -73,8 +73,8 @@ Triggered when a child hierarchy is hidden
7373

7474
```js
7575
// '#example' is wrapper ID for table hierarchy
76-
var tableEle = document.querySelector('#example .table');
77-
tableEle.addEventListener('onHideChildHierarchy', function(e) {
76+
var tableEle = document.querySelector("#example .table");
77+
tableEle.addEventListener("onHideChildHierarchy", function (e) {
7878
console.log(e);
7979
});
8080
```
@@ -96,161 +96,161 @@ tableEle.addEventListener('onHideChildHierarchy', function(e) {
9696
var dataInJson = [
9797
{
9898
data: {
99-
name: 'b1',
100-
street: 's1',
101-
city: 'c1',
99+
name: "b1",
100+
street: "s1",
101+
city: "c1",
102102
departments: 10,
103-
offices: 15
103+
offices: 15,
104104
},
105105
kids: [
106106
{
107107
data: {
108-
department: 'HR',
109-
supervisor: 'Isidor Bristol',
108+
department: "HR",
109+
supervisor: "Isidor Bristol",
110110
floor: 1,
111-
employees: 15
111+
employees: 15,
112112
},
113113
kids: [
114114
{
115115
data: {
116-
name: 'Klement Nikodemos',
117-
phone: '+938462',
118-
hire_date: 'January 1, 2010',
119-
id: 3456
116+
name: "Klement Nikodemos",
117+
phone: "+938462",
118+
hire_date: "January 1, 2010",
119+
id: 3456,
120120
},
121-
kids: []
121+
kids: [],
122122
},
123123
{
124124
data: {
125-
name: 'Madhava Helmuth',
126-
phone: '+348902',
127-
hire_date: 'May 23, 2002',
128-
id: 1234
125+
name: "Madhava Helmuth",
126+
phone: "+348902",
127+
hire_date: "May 23, 2002",
128+
id: 1234,
129129
},
130-
kids: []
130+
kids: [],
131131
},
132132
{
133133
data: {
134-
name: 'Andria Jesse',
135-
phone: '456123',
136-
hire_date: 'October 23, 2011',
137-
id: 9821
134+
name: "Andria Jesse",
135+
phone: "456123",
136+
hire_date: "October 23, 2011",
137+
id: 9821,
138138
},
139-
kids: []
140-
}
141-
]
139+
kids: [],
140+
},
141+
],
142142
},
143143
{
144144
data: {
145-
department: 'development',
146-
supervisor: 'Jim Linwood',
145+
department: "development",
146+
supervisor: "Jim Linwood",
147147
floor: 2,
148-
employees: 18
148+
employees: 18,
149149
},
150150
kids: [
151151
{
152152
data: {
153-
name: 'Origenes Maxwell',
154-
phone: '345892',
155-
hire_date: 'February 1, 2004',
156-
id: 6234
153+
name: "Origenes Maxwell",
154+
phone: "345892",
155+
hire_date: "February 1, 2004",
156+
id: 6234,
157157
},
158-
kids: []
159-
}
160-
]
158+
kids: [],
159+
},
160+
],
161161
},
162162
{
163163
data: {
164-
department: 'testing',
165-
supervisor: 'Zekeriya Seok',
164+
department: "testing",
165+
supervisor: "Zekeriya Seok",
166166
floor: 4,
167-
employees: 11
167+
employees: 11,
168168
},
169-
kids: []
170-
}
171-
]
169+
kids: [],
170+
},
171+
],
172172
},
173173
{
174174
data: {
175-
name: 'b2',
176-
street: 's10',
177-
city: 'c2',
175+
name: "b2",
176+
street: "s10",
177+
city: "c2",
178178
departments: 3,
179-
offices: 10
179+
offices: 10,
180180
},
181181
kids: [
182182
{
183183
data: {
184-
department: 'development',
185-
supervisor: 'Gallagher Howie',
184+
department: "development",
185+
supervisor: "Gallagher Howie",
186186
floor: 8,
187-
employees: 24
187+
employees: 24,
188188
},
189189
kids: [
190190
{
191191
data: {
192-
name: 'Wat Dakota'
192+
name: "Wat Dakota",
193193
},
194-
kids: []
195-
}
196-
]
194+
kids: [],
195+
},
196+
],
197197
},
198198
{
199199
data: {
200-
department: 'testing',
201-
supervisor: 'Shirley Gayle',
200+
department: "testing",
201+
supervisor: "Shirley Gayle",
202202
floor: 4,
203-
employees: 11
203+
employees: 11,
204204
},
205-
kids: []
206-
}
207-
]
205+
kids: [],
206+
},
207+
],
208208
},
209209
{
210210
data: {
211-
name: 'b3',
212-
street: 's3',
213-
city: 'c3',
211+
name: "b3",
212+
street: "s3",
213+
city: "c3",
214214
departments: 2,
215-
offices: 1
215+
offices: 1,
216216
},
217217
kids: [
218218
{
219219
data: {
220-
department: 'development'
220+
department: "development",
221221
},
222222
kids: [
223223
{
224224
data: {
225-
name: 'Wat Dakota'
225+
name: "Wat Dakota",
226226
},
227-
kids: []
228-
}
229-
]
227+
kids: [],
228+
},
229+
],
230230
},
231-
{}
232-
]
231+
{},
232+
],
233233
},
234234
235235
{
236236
data: {
237-
name: 'b4',
238-
city: 'c4'
237+
name: "b4",
238+
city: "c4",
239239
},
240-
kids: []
241-
}
240+
kids: [],
241+
},
242242
];
243243
244244
var settings = {
245245
iDisplayLength: 20,
246246
bLengthChange: false,
247247
bFilter: false,
248248
bSort: false,
249-
bInfo: false
249+
bInfo: false,
250250
};
251251
252252
var table = new nestedTables.TableHierarchy(
253-
'example',
253+
"example",
254254
dataInJson,
255255
settings
256256
);
@@ -277,51 +277,47 @@ tableEle.addEventListener('onHideChildHierarchy', function(e) {
277277
var dataInJson2 = [
278278
{
279279
data: {
280-
date: '2018-08'
280+
date: "2018-08",
281281
},
282282
kids: [
283283
{
284284
data: {
285-
' ':
286-
'<input type="checkbox" name="exampleCheckbox" value="exampleCheckbox">',
287-
img:
288-
'<img src=https:\/\/picsum.photos\/100\/100 width=20 \/>',
285+
" ": '<input type="checkbox" name="exampleCheckbox" value="exampleCheckbox">',
286+
img: "<img src=https:\/\/picsum.photos\/100\/100 width=20 \/>",
289287
like: {
290288
value: 47,
291-
cellClass: 'likeCell',
292-
headerClass: 'likeHeader'
289+
cellClass: "likeCell",
290+
headerClass: "likeHeader",
293291
},
294-
perf: { value: 130.55555555555554, cellClass: 'perf' },
295-
date: '2018-08-30'
292+
perf: { value: 130.55555555555554, cellClass: "perf" },
293+
date: "2018-08-30",
296294
},
297-
kids: []
295+
kids: [],
298296
},
299297
{
300298
data: {
301-
' ':
302-
'<input type="checkbox" name="exampleCheckbox2" value="exampleCheckbox2">',
303-
img:
304-
'<img src=https:\/\/picsum.photos\/100\/100 width=20 \/>',
299+
" ": '<input type="checkbox" name="exampleCheckbox2" value="exampleCheckbox2">',
300+
img: "<img src=https:\/\/picsum.photos\/100\/100 width=20 \/>",
305301
like: 24,
306302
perf: 66.66666666666667,
307-
date: '2018-08-31'
303+
date: "2018-08-31",
308304
},
309-
kids: []
310-
}
311-
]
312-
}
305+
kids: [],
306+
},
307+
],
308+
},
313309
];
314310
315311
var settings = {
316312
iDisplayLength: 20,
317313
bLengthChange: false,
318314
bFilter: false,
319315
bSort: false,
320-
bInfo: false
316+
bInfo: false,
321317
};
322318
323319
var table = new nestedTables.TableHierarchy(
324-
'example',
320+
"example",
325321
dataInJson,
326322
settings
327323
);
@@ -334,3 +330,6 @@ tableEle.addEventListener('onHideChildHierarchy', function(e) {
334330
## License
335331

336332
MIT © [Andrej Gajdos](http://andrejgajdos.com)
333+
334+
[Notion Api Connector](https://notionapiconnector.com/)
335+
[SalesforceToNotion](https://salesforcetonotion.com/)

0 commit comments

Comments
 (0)