1- namespace BlazorMaterialWeb ;
1+ using BlazorMaterialWeb . Common ;
2+
3+ namespace BlazorMaterialWeb ;
24
35/// <summary>
46/// Tabs organize content across different screens and views.
@@ -17,22 +19,26 @@ partial class MdTabs
1719 [ Parameter ]
1820 public EventCallback < MdTabChangeEventArgs > OnTabChanged { get ; set ; }
1921
20- public async Task < IJSObjectReference > GetTabsAsync ( ) =>
21- await GetPropertyAsync < IJSObjectReference > ( "tabs" ) ;
22+ public async Task < IJSArrayReference < IJSObjectReference > > GetTabsAsync ( )
23+ {
24+ var tabs = await GetPropertyAsync < IJSObjectReference > ( "tabs" ) ;
25+
26+ return new JSArrayReference < IJSObjectReference > ( tabs , Js ) ;
27+ }
2228
2329 public async Task < int > GetActiveTabIndexAsync ( ) =>
2430 await GetPropertyAsync < int > ( "activeTabIndex" ) ;
2531
2632 public async Task SetActiveTabIndexAsync ( int index ) =>
2733 await SetPropertyAsync ( "activeTabIndex" , index ) ;
2834
29- public async Task < ElementReference > GetActiveTabAsync ( ) =>
30- await GetPropertyAsync < ElementReference > ( "activeTab" ) ;
35+ public async Task < IJSObjectReference > GetActiveTabAsync ( ) =>
36+ await GetPropertyAsync < IJSObjectReference > ( "activeTab" ) ;
3137
32- public async Task SetActiveTabAsync ( ElementReference tab ) =>
38+ public async Task SetActiveTabAsync ( IJSObjectReference tab ) =>
3339 await SetPropertyAsync ( "activeTab" , tab ) ;
3440
35- public async Task ScrollToTabAsync ( ElementReference tab ) =>
41+ public async Task ScrollToTabAsync ( IJSObjectReference tab ) =>
3642 await InvokeMethodAsync ( "scrollToTab" , tab ) ;
3743
3844}
0 commit comments