Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Fix tabset index out of order #1738

Merged
merged 31 commits into from
Jun 29, 2018

Conversation

blackbaud-conorwright
Copy link
Contributor

Things like *ngIf cause certain tabs to be loaded before others messing up the automatic tabIndexes.
I changed the init function to be triggered by the parent instead so that they are only executed in display order.

Resolves: #1357

@@ -41,7 +40,7 @@ export class SkyTabComponent implements OnDestroy, AfterViewInit, OnChanges {

constructor(private tabsetService: SkyTabsetService, private ref: ChangeDetectorRef) {}

public ngAfterViewInit() {
public skyAfterContentInit() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're going to rename this method, can we rename it to something more meaningful, to describe what it's doing? Below, there's a comment that says, "initialize each tab's index"...Maybe something to that effect?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be good. I honestly wasn't sure what to name it and figured I would leave it up to review 😛 sorry, I probably should have just messaged you at the time

@codecov-io
Copy link

codecov-io commented Jun 22, 2018

Codecov Report

Merging #1738 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1738   +/-   ##
=======================================
  Coverage   99.98%   99.98%           
=======================================
  Files         410      410           
  Lines        8530     8531    +1     
  Branches     1252     1252           
=======================================
+ Hits         8529     8530    +1     
  Misses          1        1
Impacted Files Coverage Δ
src/modules/tabs/tabset.component.ts 100% <100%> (ø) ⬆️
src/modules/tabs/tab.component.ts 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1d7aae7...85fab36. Read the comment docs.

@Blackbaud-SteveBrush Blackbaud-SteveBrush self-assigned this Jun 25, 2018
@Blackbaud-SteveBrush
Copy link
Member

@blackbaud-conorwright We need a unit test to confirm this behavior is now working. Thank you!

@blackbaud-conorwright
Copy link
Contributor Author

test added

@Blackbaud-SteveBrush Blackbaud-SteveBrush merged commit a3fbf7e into master Jun 29, 2018
@Blackbaud-SteveBrush Blackbaud-SteveBrush deleted the fix-tabset-index-out-of-order branch June 29, 2018 17:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants