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

:odd and :even not being refreshed #36

Open
bh213 opened this issue Jan 29, 2022 · 3 comments
Open

:odd and :even not being refreshed #36

bh213 opened this issue Jan 29, 2022 · 3 comments

Comments

@bh213
Copy link
Contributor

bh213 commented Jan 29, 2022

Can domkit components be dynamically added or removed to the scene, e.g. as a result of button click and have CSS properly applied?

I also noticed that :first-child & :last-child don't work with such dynamically added components (=outside component constructor) ..

I'd like to add proper example of how to add and remove components if there exists an "official way". Thanks.

See https://github.com/bh213/heaps-domkit-sample

@ncannasse
Copy link
Member

ncannasse commented Jan 30, 2022 via email

@bh213
Copy link
Contributor Author

bh213 commented Jan 30, 2022

I think I got everything working correctly (even adding subtrees of components) but :odd and :even don't seem to update correctly when I remove e.g. first component from the list of the children.

Example here: https://bh213.github.io/heaps-domkit-sample/ -page 6, just click remove button

@ncannasse
Copy link
Member

ncannasse commented Jan 30, 2022 via email

@ncannasse ncannasse changed the title Dynamically adding and removing components :odd and :even not being refreshed Aug 3, 2022
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

No branches or pull requests

2 participants