Hi all,
I found an issue in this Lit Binder Field Strategy Docs. Using Vaadin 24.6.12.
When overriding the getFieldStrategy method and no model?: AbstractModel is given to the super call, the Checkbox value binding is broken. Changing the value in the form does result in a wrong value put in the bean:
true/checked isfalsefalse/not checked isundefined
Before I open a issue in GitHub, Is there anything I am missing?
Suggested change in the documentation would be:
override getFieldStrategy(element: any, model?: AbstractModel): FieldStrategy {
if (element.localName === 'my-text-field' && model instanceof StringModel) {
return new MyTextFieldStrategy(element);
}
- return super.getFieldStrategy(element);
+ return super.getFieldStrategy(element, model);
}
}