Fix recruit viewlets selector (#7400)

Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
Kristina
2024-12-09 22:29:47 +07:00
committed by GitHub
parent 37eff56860
commit ef70cf9d00
+10 -1
View File
@@ -752,9 +752,18 @@ export function categorizeFields (
export function makeViewletKey (loc?: Location): string {
loc = loc != null ? { path: loc.path } : getCurrentResolvedLocation()
loc.fragment = undefined
loc.query = undefined
if (loc.fragment != null && loc.fragment !== '') {
const props = decodeURIComponent(loc.fragment).split('|')
if (props.length >= 3) {
const [panel, , _class] = props
return 'viewlet' + '#' + encodeURIComponent([panel, _class].join('|'))
}
}
loc.fragment = undefined
return 'viewlet' + locationToUrl(loc)
}