diff --git a/src/Elastic.ApiExplorer/Endpoints/EndpointView.cshtml b/src/Elastic.ApiExplorer/Endpoints/EndpointView.cshtml
index f9caa0901..b8487e1fb 100644
--- a/src/Elastic.ApiExplorer/Endpoints/EndpointView.cshtml
+++ b/src/Elastic.ApiExplorer/Endpoints/EndpointView.cshtml
@@ -13,6 +13,7 @@
NavigationHtml = Model.NavigationHtml,
UrlPathPrefix = null,
VersionDropdown = null,
+ CurrentVersion = null,
AllowIndexing = false,
CanonicalBaseUrl = null,
GoogleTagManager = new GoogleTagManagerConfiguration(),
diff --git a/src/Elastic.ApiExplorer/Landing/LandingView.cshtml b/src/Elastic.ApiExplorer/Landing/LandingView.cshtml
index ccfd2d7f2..f6af0e1d7 100644
--- a/src/Elastic.ApiExplorer/Landing/LandingView.cshtml
+++ b/src/Elastic.ApiExplorer/Landing/LandingView.cshtml
@@ -13,6 +13,7 @@
NavigationHtml = Model.NavigationHtml,
UrlPathPrefix = null,
VersionDropdown = null,
+ CurrentVersion = "9.0+",
AllowIndexing = false,
CanonicalBaseUrl = null,
GoogleTagManager = new GoogleTagManagerConfiguration(),
diff --git a/src/Elastic.ApiExplorer/Operations/OperationView.cshtml b/src/Elastic.ApiExplorer/Operations/OperationView.cshtml
index 626d57f5b..bf2593d1c 100644
--- a/src/Elastic.ApiExplorer/Operations/OperationView.cshtml
+++ b/src/Elastic.ApiExplorer/Operations/OperationView.cshtml
@@ -13,6 +13,7 @@
NavigationHtml = Model.NavigationHtml,
UrlPathPrefix = null,
VersionDropdown = null,
+ CurrentVersion = null,
AllowIndexing = false,
CanonicalBaseUrl = null,
GoogleTagManager = new GoogleTagManagerConfiguration(),
diff --git a/src/Elastic.Documentation.Site/Assets/web-components/VersionDropdown.tsx b/src/Elastic.Documentation.Site/Assets/web-components/VersionDropdown.tsx
index 6640085f8..bc5b17576 100644
--- a/src/Elastic.Documentation.Site/Assets/web-components/VersionDropdown.tsx
+++ b/src/Elastic.Documentation.Site/Assets/web-components/VersionDropdown.tsx
@@ -45,14 +45,16 @@ appendIconComponentCache({
type VersionDropdownItem = {
name: string
href?: string
+ disabled: boolean
children?: VersionDropdownItem[]
}
type VersionDropdownProps = {
+ currentVersion: string
items: VersionDropdownItem[]
}
-const VersionDropdown = ({ items }: VersionDropdownProps) => {
+const VersionDropdown = ({ currentVersion, items }: VersionDropdownProps) => {
const [isPopoverOpen, setPopover] = useState(false)
const contextMenuPopoverId = useGeneratedHtmlId({
@@ -74,6 +76,7 @@ const VersionDropdown = ({ items }: VersionDropdownProps) => {
return {
name: item.name,
href: item.href,
+ disabled: item.disabled,
}
})
}
@@ -90,6 +93,7 @@ const VersionDropdown = ({ items }: VersionDropdownProps) => {
title: item.name,
initialFocusedItemIndex: 0,
width: WIDTH,
+ disabled: item.disabled,
size: 's',
items: item.children ? convertItems(item.children) : [],
}
@@ -104,6 +108,7 @@ const VersionDropdown = ({ items }: VersionDropdownProps) => {
name: item.name,
panel: item.children?.length ? index + 1 : undefined,
href: item.href,
+ disabled: item.disabled,
}
})
@@ -117,7 +122,9 @@ const VersionDropdown = ({ items }: VersionDropdownProps) => {