diff --git a/webpack/assets/javascripts/react_app/components/PF4/TableIndexPage/Table/TableHooks.js b/webpack/assets/javascripts/react_app/components/PF4/TableIndexPage/Table/TableHooks.js index 1cd91788f3d..adcd0ae6b2f 100644 --- a/webpack/assets/javascripts/react_app/components/PF4/TableIndexPage/Table/TableHooks.js +++ b/webpack/assets/javascripts/react_app/components/PF4/TableIndexPage/Table/TableHooks.js @@ -281,6 +281,9 @@ export const useBulkSelect = ({ }; }; +export const friendlySearchParam = searchParam => + decodeURIComponent(searchParam.replace(/\+/g, ' ')); + // takes a url query like ?type=security&search=name+~+foo // and returns an object // { @@ -292,8 +295,7 @@ export const useUrlParams = () => { const { search: urlSearchParam, ...urlParams } = Object.fromEntries( new URLSearchParams(location.search).entries() ); - // const searchParam = urlSearchParam ? friendlySearchParam(urlSearchParam) : ''; - const searchParam = ''; + const searchParam = urlSearchParam ? friendlySearchParam(urlSearchParam) : ''; return { searchParam,