From dd2f6438f4c6e56b865020c062d0ccc69ca7c38b Mon Sep 17 00:00:00 2001 From: Parth <108089718+parthy007@users.noreply.github.com> Date: Thu, 7 Nov 2024 19:59:23 +0530 Subject: [PATCH] Update sort changes correctly (#2590) --- frontend/src/_ui/Sort/index.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/frontend/src/_ui/Sort/index.js b/frontend/src/_ui/Sort/index.js index 2edf03c643..323d9d26e5 100644 --- a/frontend/src/_ui/Sort/index.js +++ b/frontend/src/_ui/Sort/index.js @@ -26,14 +26,9 @@ export default ({ } function keyValuePairValueChanged(value, keyIndex, index) { - if (!isRenderedAsQueryEditor) { - const newOptions = deepClone(options); - newOptions[index][keyIndex] = value; - options.length - 1 === index ? addNewKeyValuePair(newOptions) : optionchanged(getter, newOptions); - } else { - options[index][keyIndex] = value; - optionchanged(getter, options); - } + const newOptions = deepClone(options); + newOptions[index][keyIndex] = value; + options.length - 1 === index ? addNewKeyValuePair(newOptions) : optionchanged(getter, newOptions); } const commonProps = {