-
Notifications
You must be signed in to change notification settings - Fork 0
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
refactor: simplify a bit tabs component prior to signals migration #887
refactor: simplify a bit tabs component prior to signals migration #887
Conversation
@@ -38,7 +38,7 @@ export class TabsComponent implements OnDestroy { | |||
}) | |||
|
|||
// Pagination | |||
private _tabList = viewChild<ElementRef<HTMLElement>>('tabList') | |||
private _tabList = viewChild.required<ElementRef<HTMLElement>>('tabList') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This way no need to check for not defined
this._currentTabs.length === 0 || | ||
(this._selectedIndex !== undefined && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if selected index is undefined, it won't match index to select due to first condition in this if
clause
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #887 +/- ##
==========================================
+ Coverage 96.03% 96.18% +0.15%
==========================================
Files 124 124
Lines 630 629 -1
Branches 70 70
==========================================
Hits 605 605
Misses 19 19
+ Partials 6 5 -1 ☔ View full report in Codecov by Sentry. |
No description provided.