-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add items
to the NgbAccordion
#4505
Comments
Hmm, For the accordion, it looks more like a bug to me, because of the issue with this unsafe thing:
When are you doing it? Would you have a stackblitz?
accordion.toggle('one');
accordion.collapse('one');
accordion.expand('one');
accordion.expandAll();
accordion.collapseAll();
accordion.isExpanded('one');
|
Make sure to not fail when `QueryList` is `undefined` ng-bootstrap#4505
Make sure to not fail when `QueryList` is `undefined` #4505
Yeah, I'm calling it in the @input() setter, so basically it's too early. This is why I'm depending on the Currently I have workaround, but it's a dirty hack with tech debt: if (!!this.accordion && !!value) {
// TODO:https://github.com/ng-bootstrap/ng-bootstrap/issues/4505
try {
if (!this.accordion.isExpanded(value)) {
this.accordion.toggle(value);
}
}
catch { }
} |
So if the I'll close this for now, please reopen if necessary. |
Gives me this error (I changed the name of some properties):
However, in the
NgbCarousel
there's a propertyslides
which is extremely useful.As you can see, here I'm validating
slides
property:!!this.carousel?.slides
.Would it be possible to create something similar at the
NgbAccordion
:!!this.accordion?.items
?The text was updated successfully, but these errors were encountered: