-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
47 lines (47 loc) · 1.77 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>dpDataTable Demo</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.min.css">
</head>
<body>
<div class="container">
<h1>dp Data Table</h1>
<p>dp Data Table provides out-of-box functionality to build your data table faster. Bind the data and it just
works.</p>
<div id="data-table-1">Loading React Component.</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/18.2.0/umd/react.production.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/18.2.0/umd/react-dom.production.min.js"></script>
<script src="MOCK_DATA.js"></script>
<script>
function onEdit(e) {
alert("Edit item " + e.index + " whose value is \n" + JSON.stringify(e.item, undefined, 2))
}
function onDelete(e) {
alert("Delete item " + e.index + " whose value is \n" + JSON.stringify(e.item, undefined, 2))
}
function onItemsChange(e) {
console.info(e.changeReason);
}
</script>
<script src="dist/dpDataTable.js"></script>
<script>
window.RenderDpDataTable({
selector: '#data-table-1',
items: MOCK_DATA,
headers: {first_name: 'First Name', last_name: 'Last Name', gender: 'Gender', ip_address: 'IP Address'},
showFilter: true,
showSort: true,
onEditing: onEdit,
onDeleting: onDelete,
onItemsChange: onItemsChange
});
</script>
</body>
</html>