fixup! [IMP] qweb: introduce t-model directive

This commit is contained in:
Bruno Boi
2021-11-03 11:11:18 +01:00
committed by Géry Debongnie
parent 233c953243
commit 4bdfaf96f3
4 changed files with 84 additions and 47 deletions
-7
View File
@@ -350,13 +350,6 @@ function parseDOMNode(node: Element, ctx: ParsingContext): AST | null {
const hasNumberMod = attr.includes(".number");
const hasTrimMod = attr.includes(".trim");
const eventType = isRadioInput ? "click" : isSelect || hasLazyMod ? "change" : "input";
const similarTOnEvent = nodeAttrsNames.find((a) => a.startsWith(`t-on-${eventType}`));
if (similarTOnEvent) {
throw new Error(
`Conflicting t-model and ${similarTOnEvent} directives on event type: ${eventType}`
);
}
model = {
baseExpr,