Skip to content

Commit

Permalink
ifx value should not be empty after change operator
Browse files Browse the repository at this point in the history
  • Loading branch information
rahuld-dev committed Jul 11, 2024
1 parent 2b49d73 commit 215f59e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Assets/js/custom-objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand All @@ -68,7 +68,7 @@ CustomObjects = {
newValueField.append(
mQuery("<option></option>")
.attr('value', optionValue)
.attr('selected', valueField.attr('value') === optionValue)
.attr('selected', valueField.val() === optionValue)
.text(options[optionValue])
);
}
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 215f59e

Please sign in to comment.