From 215f59e0d119e74af0247922886fb64203dc044a Mon Sep 17 00:00:00 2001 From: rahuld-dev Date: Thu, 11 Jul 2024 13:36:13 +0530 Subject: [PATCH] ifx value should not be empty after change operator --- Assets/js/custom-objects.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Assets/js/custom-objects.js b/Assets/js/custom-objects.js index c8635665f..92dba61b3 100644 --- a/Assets/js/custom-objects.js +++ b/Assets/js/custom-objects.js @@ -44,7 +44,7 @@ CustomObjects = { 'id': valueField.attr('id'), 'name': valueField.attr('name'), 'autocomplete': valueField.attr('autocomplete'), - 'value': valueField.attr('value') + 'value': valueField.val() }; const fieldType = selectedField.attr('data-field-type'); @@ -68,7 +68,7 @@ CustomObjects = { newValueField.append( mQuery("") .attr('value', optionValue) - .attr('selected', valueField.attr('value') === optionValue) + .attr('selected', valueField.val() === optionValue) .text(options[optionValue]) ); } @@ -97,10 +97,11 @@ CustomObjects = { } if (isEmptyOperator) { + newValueField.val(null); newValueField.attr('value', ''); newValueField.attr('disabled', 'disabled'); } else { - newValueField.attr('value', valueFieldAttrs['value']); + newValueField.val(valueField.val()); } newValueField.attr(valueFieldAttrs);