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

Load on the fly #418

Open
Mte90 opened this issue Jan 31, 2024 · 0 comments
Open

Load on the fly #418

Mte90 opened this issue Jan 31, 2024 · 0 comments

Comments

@Mte90
Copy link

Mte90 commented Jan 31, 2024

So reading the code on https://github.com/danirus/django-comments-xtd/blob/master/django_comments_xtd/static/django_comments_xtd/js/src/index.js#L6

Seems that if the selector doesn't exist there is a JS crash (I can confirm it) but also if the comments are loaded after the library loading this is not possible (remember #334).

My user case is that I have the comments in some pages but in others they are showed after a clicked (loaded with HTMX so they aren't in the HTML yet).
Ideally this cose should check in runtime for new items, also the problem is that natively uses the ID that need to be unique.

I will work on a PR.

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

1 participant