-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathdemo.js
37 lines (33 loc) · 915 Bytes
/
demo.js
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
import { html } from 'lit';
import { model } from './story.args';
import changelog from './CHANGELOG.md';
import readme from './README.md';
import './index';
export default {
title: 'Examples/Table Sortable/Pure HTML',
parameters: {
readme,
usage: { disable: true },
changelog,
controls: { disable: true },
},
};
export const OnRowClick = () => {
window.onCallbackClick = ({ detail: { index, type, textArray } }) => {
if (index > -1) {
const renderArea = document.querySelector('#renderArea');
renderArea.innerHTML = `Pressed on row ${index} in ${type}.
Inner Text is: ${JSON.stringify(textArray)}`;
}
};
return html`
<axa-table-sortable
onclick="onCallbackClick(arguments[0])"
innerscroll="500"
datesortcolumnindex="3,4"
model="${JSON.stringify(model)}"
>
</axa-table-sortable>
<div id="renderArea"></div>
`;
};