Skip to content

Commit 53a8a0c

Browse files
committed
Allow customizing a tabs' ID
1 parent 032466e commit 53a8a0c

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

site/lib/src/components/common/tabs.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class DashTabs implements CustomComponent {
4343
isActive: tabIndex == 0,
4444
wrapperId: wrapperId,
4545
child: builder.build(tab.children),
46+
saveId: tab.attributes['id'],
4647
),
4748
],
4849
);
@@ -115,9 +116,10 @@ class _DashTabPane extends StatelessComponent {
115116
required this.isActive,
116117
required this.wrapperId,
117118
required this.child,
119+
String? saveId,
118120
}) : tabId = '$baseId-tab',
119121
panelId = '$baseId-tab-panel',
120-
saveId = slugify(tabName);
122+
saveId = saveId ?? slugify(tabName);
121123

122124
final String tabName;
123125
final String tabId;

site/lib/src/style_hash.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
// dart format off
33

44
/// The generated hash of the `main.css` file.
5-
const generatedStylesHash = 'MdSvtstM9vzn';
5+
const generatedStylesHash = 'nvTevrLjFn98';

src/content/platform-integration/platform-channels.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ platform side and vice versa:
175175
{:.table .table-striped}
176176

177177
</Tab>
178-
<Tab name="C++">
178+
<Tab name="C++" id="cpp">
179179

180180
| Dart | C++ |
181181
| ------------------ | ---------------------------------------------------------- |

0 commit comments

Comments
 (0)