Skip to content

Commit

Permalink
set selected index by default
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderMoiseev committed Sep 14, 2023
1 parent 9e2bb67 commit 28ec86e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions JSDemos/Demos/Tabs/Overview/Angular/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<dx-tabs
#withText
id="withText"
[selectedIndex]="0"
[dataSource]="tabsWithText"
[scrollByContent]="false"
[showNavButtons]="false"
Expand All @@ -13,6 +14,7 @@
<dx-tabs
#withIconAndText
id="withIconAndText"
[selectedIndex]="0"
[dataSource]="tabsWithIconAndText"
[scrollByContent]="false"
[showNavButtons]="false"
Expand All @@ -22,6 +24,7 @@
<dx-tabs
#withIcon
id="withIcon"
[selectedIndex]="0"
[dataSource]="tabsWithIcon"
[scrollByContent]="false"
[showNavButtons]="false"
Expand Down
3 changes: 3 additions & 0 deletions JSDemos/Demos/Tabs/Overview/React/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ const App = () => {
showNavButtons={showNavigation}
orientation={orientation}
stylingMode={stylingMode}
selectedIndex={0}
/>
</div>
<div className="tabs-container">
Expand All @@ -77,6 +78,7 @@ const App = () => {
orientation={orientation}
stylingMode={stylingMode}
iconPosition={iconPosition}
selectedIndex={0}
/>
</div>
<div className="tabs-container">
Expand All @@ -87,6 +89,7 @@ const App = () => {
orientation={orientation}
stylingMode={stylingMode}
iconPosition={iconPosition}
selectedIndex={0}
/>
</div>
</div>
Expand Down
5 changes: 4 additions & 1 deletion JSDemos/Demos/Tabs/Overview/Vue/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<div class="tabs-container">
<DxTabs
:data-source="tabsWithText"
selectedIndex="0"
@initialized="saveTabInstance1"
id="withText"
:scroll-by-content="false"
Expand All @@ -14,6 +15,7 @@
<DxTabs
:data-source="tabsWithIconAndText"
@initialized="saveTabInstance2"
selectedIndex="0"
id="withIconAndText"
:scroll-by-content="false"
:show-nav-buttons="false"
Expand All @@ -22,6 +24,7 @@
<div class="tabs-container">
<DxTabs
:data-source="tabsWithIcon"
selectedIndex="0"
@initialized="saveTabInstance3"
id="withIcon"
:scroll-by-content="false"
Expand Down Expand Up @@ -189,7 +192,7 @@ export default {
}
.dx-tab {
width: 120px;
width: 135px;
}
.tabs-container {
Expand Down
3 changes: 3 additions & 0 deletions JSDemos/Demos/Tabs/Overview/jQuery/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@ $(() => {
const tab1 = $('#withText').dxTabs({
showNavButtons: false,
dataSource: tabsText,
selectedIndex: 0,
}).dxTabs('instance');

const tab2 = $('#withIconAndText').dxTabs({
showNavButtons: false,
dataSource: tabsIconAndText,
iconPosition: iconPositions[0],
selectedIndex: 0,
}).dxTabs('instance');

const tab3 = $('#withIcon').dxTabs({
showNavButtons: false,
dataSource: tabsIcon,
selectedIndex: 0,
}).dxTabs('instance');

$('#orientation').dxSelectBox({
Expand Down

0 comments on commit 28ec86e

Please sign in to comment.