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

Content-aware component containers #156

Closed
vaadin-miki opened this issue Jun 10, 2020 · 1 comment · Fixed by #273
Closed

Content-aware component containers #156

vaadin-miki opened this issue Jun 10, 2020 · 1 comment · Fixed by #273
Labels
enhancement New feature or request

Comments

@vaadin-miki
Copy link
Owner

Create component(s) that fire events when something is added or removed to them, regardless of the level of nesting.

Use case: a layout into which components are added should fire events when something has been added or removed from it.

Mutation observers seem to be a good approach, as detailed in https://stackoverflow.com/questions/2844565/is-there-a-javascript-jquery-dom-change-listener

@vaadin-miki vaadin-miki added the enhancement New feature or request label Jun 10, 2020
@vaadin-miki vaadin-miki added this to the Backlog milestone Jun 10, 2020
@vaadin-miki
Copy link
Owner Author

it seems that client-side nodes cannot be passed to server-side (causing an error about endless recursion); this means that the first implementation will just report that there have been changes to the dom and nothing else

a simple workaround for finding objects on the server would be to register them with content-aware before they are physically added (e.g. by setting a property of that new object, getting it on the client and then passing that to the server) - this defeats the purpose of content awareness, though

maybe there exists a better way? it seems near impossible to figure out a server-side object from a client-side component, but perhaps I am missing something?

vaadin-miki added a commit that referenced this issue Feb 4, 2021
vaadin-miki added a commit that referenced this issue Feb 4, 2021
@vaadin-miki vaadin-miki modified the milestones: Backlog, Next release Feb 22, 2021
vaadin-miki added a commit that referenced this issue Feb 22, 2021
feedback from users (if any ever) will decide how the feature will be developed further
vaadin-miki added a commit that referenced this issue Feb 22, 2021
#156 done in its first iteration

feedback from users (if any ever) will decide how the feature will be developed further
vaadin-miki added a commit that referenced this issue Mar 3, 2021
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

Successfully merging a pull request may close this issue.

1 participant