Skip to content

Commit

Permalink
Improved: the key to separate fieldName and type with _(#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
ymaheshwari1 committed Apr 3, 2024
1 parent 68d9abe commit 6ed4723
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/views/BrokeringQuery.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
}, {})
Expand Down Expand Up @@ -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
}, {})
Expand Down

0 comments on commit 6ed4723

Please sign in to comment.