From ef70cf9d00dae3b56e1be193aef0fdc93314e60f Mon Sep 17 00:00:00 2001 From: Kristina <kristin.fefelova@gmail.com> Date: Mon, 9 Dec 2024 19:29:47 +0400 Subject: [PATCH] Fix recruit viewlets selector (#7400) Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com> --- plugins/view-resources/src/utils.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/plugins/view-resources/src/utils.ts b/plugins/view-resources/src/utils.ts index 8bf9723798..01124c437a 100644 --- a/plugins/view-resources/src/utils.ts +++ b/plugins/view-resources/src/utils.ts @@ -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) }