[FIX] bind lifecycle callbacks to component

Before this commit, some of the callbacks were bound to the component
and some were not.
This commit makes all the callbacks bind to the component.
This commit is contained in:
Michael (mcm)
2022-01-18 14:54:58 +01:00
committed by Géry Debongnie
parent 83d38a6f48
commit 057e6944d6
3 changed files with 89 additions and 10 deletions
@@ -187,6 +187,28 @@ exports[`lifecycle hooks hooks are called in proper order in widget creation/des
}"
`;
exports[`lifecycle hooks lifecycle callbacks are bound to component 1`] = `
"function anonymous(bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
return function template(ctx, node, key = \\"\\") {
return component(\`Test\`, {rev: ctx['rev']}, key + \`__1\`, node, ctx);
}
}"
`;
exports[`lifecycle hooks lifecycle callbacks are bound to component 2`] = `
"function anonymous(bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
return function template(ctx, node, key = \\"\\") {
return text(ctx['props'].rev);
}
}"
`;
exports[`lifecycle hooks lifecycle semantics 1`] = `
"function anonymous(bdom, helpers
) {