diff --git a/src/resources/helpers.js b/src/resources/helpers.js index 0a90113043..53ed696385 100644 --- a/src/resources/helpers.js +++ b/src/resources/helpers.js @@ -65,7 +65,7 @@ export const usePrepareDetailsProps = ({ namespaceId, showYamlTab, }) => { - const encodedResourceName = encodeURIComponent(resourceName); + const encodedResourceName = encodeURIComponent(resourceName?.trimEnd()); const queryParams = new URLSearchParams(window.location.search); const { i18n, t } = useTranslation(); const api = apiGroup ? `apis/${apiGroup}/${apiVersion}` : `api/${apiVersion}`; diff --git a/src/shared/components/GenericList/GenericList.js b/src/shared/components/GenericList/GenericList.js index 1dc473e44d..ae773c72a1 100644 --- a/src/shared/components/GenericList/GenericList.js +++ b/src/shared/components/GenericList/GenericList.js @@ -308,9 +308,10 @@ export const GenericList = ({ }; const handleRowClick = e => { - const item = + const item = ( e.target.children[nameColIndex].children[0].innerText ?? - e.target.children[nameColIndex].innerText; + e.target.children[nameColIndex].innerText + )?.trimEnd(); const hasNamepace = namespaceColIndex !== -1; const itemNamespace = hasNamepace