Open
Description
let subnodes = van.state([]);
...
button({
innerHTML: '+',
onclick: () =>
{subnodes.push(key + '.' + (subnodes.length + 1))}
}),
if I do above, it doesn't trigger any change
if I change onclick to
onclick: () =>
{subnodes.val = [...subnodes.val, (key + '.' + (subnodes.val.length + 1))]}
it works as expected.
same issue/behavior with subnodes.val.splice
any insight why push/splice doesn't work?
Metadata
Metadata
Assignees
Labels
No labels