Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lit-form] make model API not depend on form binder #2060

Closed
platosha opened this issue Feb 12, 2024 · 0 comments · Fixed by #2522
Closed

[lit-form] make model API not depend on form binder #2060

platosha opened this issue Feb 12, 2024 · 0 comments · Fixed by #2522
Assignees
Labels
hilla Issues related to Hilla

Comments

@platosha
Copy link
Contributor

platosha commented Feb 12, 2024

In few cases, the current models' API implementation requires direct access to the respective binder node:

  • AbstractModel::valueOf() - alternative: binderNode.value
  • AbstractModel::toString() - alternative: String(binderNode.value)
  • ArrayModel::[Symbol.iterator]() - no alternative yet

As part of introducing Object-based models, and extracting models into a separate package for wider use, it would be great to replace these APIs with some alternatives that do not require invoking binder nodes from models.

Let's deprecate these APIs and provide alternative API for iterating arrays in the binder node.

Documentation needs to be updated accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hilla Issues related to Hilla
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants