-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
const collapsibleCell = (node: ModelNode, headerCell: VNode, contentCell: VNode): VNode => {
return h('div.collapsibleCell', {}, [
h('div.header', {}, [
row(
h(
'button',
{
on: {
click: (evt) => {
console.log('click', evt.target);
const content = $(evt.target).closest('.header').siblings('.content');
if ($(evt.target).text() == '+') {
$(evt.target).text('-');
content.removeClass('hidden');
} else {
$(evt.target).text('+');
content.addClass('hidden');
}
},
},
},
['+'],
),
headerCell,
),
]),
h('div.content.hidden', {}, [contentCell]),
]);
};
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels