Skip to content

Commit ed7744d

Browse files
committed
fix(tabs/bottom-navigation): wrong tabBar position
1 parent b2d564c commit ed7744d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/bottom-navigation/index.ios.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Types
22
import { TabContentItem } from '@nativescript-community/ui-material-core/tab-navigation-base/tab-content-item';
33
import { TabNavigationBase, getIconSpecSize, itemsProperty, selectedIndexProperty, tabStripProperty } from '@nativescript-community/ui-material-core/tab-navigation-base/tab-navigation-base';
4+
import { TabsPosition } from '@nativescript-community/ui-material-core/tab-navigation-base/tab-navigation/index-common';
45
import { TabStrip } from '@nativescript-community/ui-material-core/tab-navigation-base/tab-strip';
56
import { TabStripItem } from '@nativescript-community/ui-material-core/tab-navigation-base/tab-strip-item';
67
// Types
@@ -277,6 +278,7 @@ export const iosCustomPositioningProperty = new Property<BottomNavigation, boole
277278

278279
@CSSType('BottomNavigation')
279280
export class BottomNavigation extends TabNavigationBase {
281+
tabsPosition = TabsPosition.Bottom;
280282
public viewController: UITabBarControllerImpl;
281283
public items: TabContentItem[];
282284
private mDelegate: UITabBarControllerDelegateImpl;

src/core/tab-navigation-base/tab-navigation/index-common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const offscreenTabLimitProperty = new Property<TabNavigationBase, number>
3939
});
4040
offscreenTabLimitProperty.register(TabNavigationBase);
4141

42-
export const tabsPositionProperty = new Property<TabNavigationBase, TabsPosition>({ name: 'tabsPosition' });
42+
export const tabsPositionProperty = new Property<TabNavigationBase, TabsPosition>({ name: 'tabsPosition', defaultValue: TabsPosition.Top });
4343
tabsPositionProperty.register(TabNavigationBase);
4444

4545
// export type IOSTabBarItemsAlignment = 'leading' | 'justified' | 'center' | 'centerSelected';

0 commit comments

Comments
 (0)