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

fix: nested props bindings #35

Merged
merged 1 commit into from
Jul 6, 2022
Merged

fix: nested props bindings #35

merged 1 commit into from
Jul 6, 2022

Conversation

foxeyes
Copy link
Member

@foxeyes foxeyes commented Jul 6, 2022

nested props bindings

The issue was related to the custom elements construction flow, where was a moment when something tries to set some property to the component but it wasn't properly constructed yet.

  • setNestedProperty utility function was added
  • basic template processor was fixed
  • component now able to restore nested properties was set before initialization

* @param {String} path
* @param {any} value
*/
export function setNestedProp(parent, path, value) {
Copy link
Contributor

@nd0ut nd0ut Jul 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's export this one from the module. It could be useful at blocks in the future, for deep template data for example.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep.

@foxeyes foxeyes merged commit 6ff6f7e into main Jul 6, 2022
@foxeyes foxeyes deleted the fix-nested-props branch July 6, 2022 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants