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 data-bs-parent #62

Closed
wants to merge 1 commit into from
Closed

Fix data-bs-parent #62

wants to merge 1 commit into from

Conversation

JimiRecard
Copy link
Contributor

Currently, we get a JS error (Uncaught TypeError: 'querySelectorAll' called on an object that does not implement interface Element.)

This, as is, fixes the expected default behavior (see https://getbootstrap.com/docs/5.0/components/accordion/#example).
If implemented the right kwarg in Container class on bootstrap.py, this will also allow for the always open behavior (see https://getbootstrap.com/docs/5.0/components/accordion/#always-open), since all we need is get rid of data-bs-parent.

Currently, we get a JS error (Uncaught TypeError: 'querySelectorAll' called on an object that does not implement interface Element.)

This, as is, fixes the expected default behavior (see https://getbootstrap.com/docs/5.0/components/accordion/#example).
If implemented the right kwarg in Container class on bootstrap.py, this will also allow for the always open behavior (see https://getbootstrap.com/docs/5.0/components/accordion/#always-open), since all we need is get rid of data-bs-parent.
@smithdc1
Copy link
Member

Thanks for the PR. 👍

Could you have a look at fixing the tests.

It would also be great to see a test for the second use case you describe. We should then add a note to the readme as I think this would be a new feature for the bs5 template pack.

@JimiRecard
Copy link
Contributor Author

Yeah, I'll take a look at the tests. I was honestly not expecting them to fail, but then again, who expects that, right?

I agree, the readme note is a nice touch. I tried to follow the same principle already used for the active=True kwargs, so it should be straightforward.

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