Skip to content

Commit e2006c8

Browse files
fix(tabs): ajusta reposicionamento de tabs filhas
Ajusta reposicionamento de tabs filhas Fixes DTHDUI-9214
1 parent ff2426a commit e2006c8

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

projects/ui/src/lib/components/po-tabs/po-tabs.component.spec.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -612,14 +612,13 @@ describe('PoTabsComponent:', () => {
612612

613613
it('selectedTab: should correctly handle a tab in the dropdown', () => {
614614
const clickEventMock = new EventEmitter<any>();
615-
component.quantityTabsButton = 2;
616615

617616
const tabMock1 = { id: 'tab1', active: false, click: clickEventMock };
618617
const tabMock2 = { id: 'tab2', active: false, click: clickEventMock };
619-
const tabMockInDropdown = { id: 'tab3', active: false, click: clickEventMock };
618+
const tabMockInDropdown = { id: 'tab1', active: false, click: clickEventMock };
620619

621620
component['tabsDefault'] = [tabMock1, tabMock2];
622-
component['tabsDropdown'] = [tabMockInDropdown];
621+
component.tabsChildren['_results'] = [tabMockInDropdown];
623622

624623
spyOn(component, 'onTabActiveByDropdown');
625624
const changeDetectorSpy = spyOn(component['changeDetector'], 'detectChanges');

projects/ui/src/lib/components/po-tabs/po-tabs.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ export class PoTabsComponent extends PoTabsBaseComponent implements OnInit, Afte
219219
tab.click.emit(tab);
220220
}
221221

222-
const isTabInDropdown = this.tabsDropdown.some(t => t.id === tab.id);
222+
const isTabInDropdown = this.overflowedTabs.some(t => t.id === tab.id);
223223
if (isTabInDropdown) {
224224
this.onTabActiveByDropdown(tab);
225225
}

0 commit comments

Comments
 (0)