[IMP] qweb/components: remove t-ref on components

Refs to component expose a lot of implementation details that should be
private to parents. Parent to child communication should go through
props.
This commit is contained in:
Samuel Degueldre
2021-11-10 08:18:25 +01:00
committed by Géry Debongnie
parent ca139166ab
commit a122a94180
8 changed files with 73 additions and 142 deletions
@@ -1,5 +1,21 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`refs basic use 1`] = `
"function anonymous(bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component } = bdom;
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber } = helpers;
let block1 = createBlock(\`<div block-ref=\\"0\\"/>\`);
return function template(ctx, node, key = \\"\\") {
const refs = ctx.__owl__.refs;
let d1 = (el) => refs[\`div\`] = el;
return block1([d1]);
}
}"
`;
exports[`refs refs are properly bound in slots 1`] = `
"function anonymous(bdom, helpers
) {