You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enables or disables `TabItem` activation with URL Permalink fragment.
42
+
**NOTE: in order to make TabActivation work `Majorsoft.Blazor.Components.PermaLink` component is used and it MUST [set up correctly](https://github.com/majorimi/blazor-components/blob/master/.github/docs/PermaLink.md#configuration)!**
Permalink value to append to the URL and activate the `TabItem` based on matching value.
75
+
**NOTE: in order to make TabActivation work `Majorsoft.Blazor.Components.PermaLink` component is used and it MUST [set up correctly](https://github.com/majorimi/blazor-components/blob/master/.github/docs/PermaLink.md#configuration)!**
70
76
71
77
**Arbitrary HTML attributes e.g.: `tabindex="1"` will be passed to the corresponding rendered HTML element `<input>`**.
72
78
@@ -88,11 +94,42 @@ Add using statement to your Blazor `<component/page>.razor` file. Or globally re
88
94
@using Majorsoft.Blazor.Components.Tabs
89
95
```
90
96
97
+
### Dependences
98
+
**Majorsoft.Blazor.Components.Tabs** package "partially" depends on other Majorsoft Nuget packages:
which track navigations (URL changes) and identify permalink elements.
103
+
104
+
**NOTE: only TabItem activation feature depend on Permalink. If you don't want to use that feature just leave `Permalink` parameters empty and do not setup PermalinkWatcher.
105
+
Also later this feature can be disabled by `AllowTabActivationByPermalink = false`.**
106
+
91
107
### `TabsPanel` and `TabItem` usage
92
108
93
109
Following code example shows how to use **`TabsPanel`** with **`TabItem`** component in your Blazor App.
94
110
111
+
**NOTE: to use TabActivation feature `Permalink="Tab1"` must be set and Permalink services must be [configured correctly](https://github.com/majorimi/blazor-components/blob/master/.github/docs/PermaLink.md#configuration)!**
112
+
95
113
```
114
+
@*Simple tab usage*@
115
+
<TabsPanel>
116
+
<TabItems>
117
+
<TabItem>
118
+
<Header>Tab1</Header>
119
+
<Content>Tab1</Content>
120
+
</TabItem>
121
+
<TabItem>
122
+
<Header>Tab2</Header>
123
+
<Content>Tab2</Content>
124
+
</TabItem>
125
+
<TabItem>
126
+
<Header>Tab3</Header>
127
+
<Content>Tab3</Content>
128
+
</TabItem>
129
+
</TabItems>
130
+
</TabsPanel>
131
+
132
+
@*Advanced tab usage*@
96
133
<TabsPanel @ref="_tabs"
97
134
ActiveColor="@_activeColor"
98
135
InactiveColor="@_inactiveColor"
@@ -105,26 +142,26 @@ Following code example shows how to use **`TabsPanel`** with **`TabItem`** comp
Copy file name to clipboardExpand all lines: src/Majorsoft.Blazor.Components.Common.JsInterop/Majorsoft.Blazor.Components.Common.JsInterop.csproj
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@
17
17
<RepositoryType>Git</RepositoryType>
18
18
<Description>Blazor component that provides useful functionality and event notifications which can be achieved only with JS Interop e.g. scroll, clipboard, focus, resize, language detection, GEO location, etc. Part of Majorsoft Blazor library.</Description>
_logger.LogDebug($"{nameof(PermaLinkWatcherService)} - {nameof(ChangePermalink)}: current URL: '{_navigationManager.Uri}', new URL Permalink: '{newPermalink}'");
0 commit comments