“Using a Field Strategy” documentation
Nobody has claimed this yet.
- Dominant language
- AsciiDoc
- Stars
- 38
- Forks
- 225
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 170
Description
Tell us about your request
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
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);
}
}
If you think this issue is important, add a 👍 reaction to help the community and maintainers prioritize this issue.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open the linked Lit Binder Field Strategy documentation and go to the “Using a Field Strategy” section. Update the example so the overridden getFieldStrategy method passes model to the superclass, then verify that the example reflects the reported Checkbox binding behavior and preserves the custom text-field strategy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100