From 6ed4723385929be386c8351c79499fe8e7fae7da Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Wed, 3 Apr 2024 15:32:38 +0530 Subject: [PATCH] Improved: the key to separate fieldName and type with _(#146) --- src/views/BrokeringQuery.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/BrokeringQuery.vue b/src/views/BrokeringQuery.vue index a86123e..fa30e4e 100644 --- a/src/views/BrokeringQuery.vue +++ b/src/views/BrokeringQuery.vue @@ -862,12 +862,12 @@ function findSortDiff(previousSeq: any, updatedSeq: any) { // Updated the keys of the object as there are some cases in which the field is same for both filter and sort options thus causing issue when doing same kind operation (addtion or deletion) of fields seqToUpdate = Object.keys(seqToUpdate).reduce((updatedSeq: any, key) => { - updatedSeq[key + 'sort'] = seqToUpdate[key] + updatedSeq[key + '_sort'] = seqToUpdate[key] return updatedSeq }, {}) seqToRemove = Object.keys(seqToRemove).reduce((updatedSeq: any, key) => { - updatedSeq[key + 'sort'] = seqToRemove[key] + updatedSeq[key + '_sort'] = seqToRemove[key] return updatedSeq }, {}) @@ -906,12 +906,12 @@ function findFilterDiff(previousSeq: any, updatedSeq: any) { // Updated the keys of the object as there are some cases in which the field is same for both filter and sort options thus causing issue when doing same kind operation (addtion or deletion) of fields seqToUpdate = Object.keys(seqToUpdate).reduce((updatedSeq: any, key) => { - updatedSeq[key + 'filter'] = seqToUpdate[key] + updatedSeq[key + '_filter'] = seqToUpdate[key] return updatedSeq }, {}) seqToRemove = Object.keys(seqToRemove).reduce((updatedSeq: any, key) => { - updatedSeq[key + 'filter'] = seqToRemove[key] + updatedSeq[key + '_filter'] = seqToRemove[key] return updatedSeq }, {})