-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
42 lines (38 loc) · 1.28 KB
/
app.js
File metadata and controls
42 lines (38 loc) · 1.28 KB
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
import { html } from "@inglorious/web"
export const app = {
render(api) {
const grid = api.getEntity("agGrid")
return html`
<div class="app-shell">
<header class="app-header">
<h1>AG Grid Demo (Inglorious)</h1>
<p>
The app re-renders often, but the grid instance stays alive and only
receives incremental updates.
</p>
</header>
<section class="controls">
<button @click=${() => api.notify("#agGrid:tick")}>
Force App Re-render
</button>
<button @click=${() => api.notify("#agGrid:shuffleRows")}>
Shuffle Rows
</button>
<button @click=${() => api.notify("#agGrid:bumpPrices")}>
Bump Prices
</button>
<button @click=${() => api.notify("#agGrid:addRow")}>Add Row</button>
</section>
<main class="demo-main">
<div class="iw-ag-grid-meta">
<span><b>Entity:</b> ${grid.id}</span>
<span><b>Render Tick:</b> ${grid.tickCount}</span>
<span><b>Grid API ID:</b> ${grid.gridApiId ?? "pending"}</span>
<span><b>Status:</b> ${grid.gridStatus}</span>
</div>
${api.render("agGrid")}
</main>
</div>
`
},
}