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

Allow data to cascade #23

Open
scottkellum opened this issue Jun 20, 2019 · 4 comments
Open

Allow data to cascade #23

scottkellum opened this issue Jun 20, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@scottkellum
Copy link
Collaborator

This might require registering the custom property and using get computed value for each element, then using that as the data. This way data can be set in the parent component container and cascade into all elements in the component.

@KargJonas KargJonas added the enhancement New feature or request label Jun 20, 2019
@c-harding
Copy link
Collaborator

c-harding commented Jun 21, 2019

How would this merge with the child's data, if present? Would it be a simple override, or element-wise override?

@KargJonas
Copy link
Collaborator

I'd do it with a reserved data.props variable, somewhat like react..

@KargJonas KargJonas pinned this issue Jun 21, 2019
@scottkellum
Copy link
Collaborator Author

I was thinking child data would override parent data, but understand that having both parent and child data might be helpful, especially with nested components.

@c-harding
Copy link
Collaborator

This involves changing the render order. Basically BFS of every element in the DOM against the list of all selectors, which sounds pretty inefficient

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants