From ab3f48f4a017ede820ae1358964b52ebc720857e Mon Sep 17 00:00:00 2001 From: Michal Klobukowski Date: Thu, 14 Mar 2019 15:34:15 +0100 Subject: [PATCH] Update buildQueryFromKeyMap patterns to match new property tokens Feature #14917 Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski --- src/store/search-bar/search-bar-actions.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/store/search-bar/search-bar-actions.ts b/src/store/search-bar/search-bar-actions.ts index bffa337b..8734888b 100644 --- a/src/store/search-bar/search-bar-actions.ts +++ b/src/store/search-bar/search-bar-actions.ts @@ -235,7 +235,7 @@ const buildQueryFromKeyMap = (data: any, keyMap: string[][], mode: 'rebuild' | ' if (data.hasOwnProperty(key)) { const pattern = v === false ? `${field.replace(':', '\\:\\s*')}\\s*` - : `${field.replace(':', '\\:\\s*')}\\:\\s*[\\w|\\#|\\-|\\/]*\\s*`; + : `${field.replace(':', '\\:\\s*')}\\:\\s*"[\\w|\\#|\\-|\\/]*"\\s*`; value = value.replace(new RegExp(pattern), ''); } @@ -286,6 +286,8 @@ export const getQueryFromAdvancedData = (data: SearchBarAdvanceFormData, prevDat .forEach(p => keyMap.push([`has:"${p.key}"`, `prop-"${p.key}"`])); if (prevData) { + const fd = flatData(data); + const pfd = flatData(prevData); const obj = getModifiedKeysValues(flatData(data), flatData(prevData)); value = buildQueryFromKeyMap({ searchValue: data.searchValue, -- 2.39.5