-
Notifications
You must be signed in to change notification settings - Fork 20
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
Comments
Yes you can add and remove components dynamically. All you need it to call
style.sync() in your update loop.
Le sam. 29 janv. 2022 à 10:41, Gorazd Breskvar ***@***.***> a
écrit :
… 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
—
Reply to this email directly, view it on GitHub
<#36>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHZXQHKFTYYINYQQLBPOF3UYOY3BANCNFSM5NCV3NXA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
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 |
Oh i think indeed these cases are not handled ! Atm :odd/:even won't react
dynamically. That's indeed a bug, but not easy to fix at all.
Le dim. 30 janv. 2022 à 19:43, Gorazd Breskvar ***@***.***> a
écrit :
… 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
—
Reply to this email directly, view it on GitHub
<#36 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHZXQBPZ4NPEN6XKXA66HDUYWBDXANCNFSM5NCV3NXA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
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
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
The text was updated successfully, but these errors were encountered: