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

Consider to support explicitly addressing individual text children from view models #33

Open
theseer opened this issue Nov 5, 2023 · 0 comments

Comments

@theseer
Copy link
Member

theseer commented Nov 5, 2023

Given the following markup:

<p property="example">
Hello <b>world</b> out there!
</p>

It might be convenient, to have a means to explicitly address the "\nHello " or " out there!\n" children of <p>.

When calling example on the view model, we could pass in an array of strings instead of the full text ("Hello world out there"). which is rather useless in this case as it contains the child <b>'s content as well.

If the returned type is a TextCollection, we could replace the individual text children. If an array of TextCollections is returned, we could loop, duplicating <p>.

The behavior for the other already supported return types does not change.

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

No branches or pull requests

1 participant