Skip to content

Commit

Permalink
There was added ability to check previous value of dropdown field af…
Browse files Browse the repository at this point in the history
…ter it was changed. This was done for issue #100.
  • Loading branch information
RomanPerin committed May 14, 2015
1 parent 26acdf1 commit 7050713
Showing 1 changed file with 10 additions and 0 deletions.
Expand Up @@ -425,6 +425,8 @@ O$.DropDownField = {
if (dropDown._ddf_focused)
O$._selectTextRange(field, field.value.length, field.value.length);

dropDown._previousLabel = dropDown._lastOnchangeItemLabel;
dropDown._previousValue = dropDown._lastOnchangeItemValue;
dropDown._lastOnchangeItemLabel = dropDown.value;
dropDown._lastOnchangeItemValue = dropDown._selectedItemValue;

Expand Down Expand Up @@ -470,6 +472,14 @@ O$.DropDownField = {
dropDown._setValue(text);
},

getPreviousLabel: function() {
return dropDown._previousLabel ? dropDown._previousLabel : dropDown.value;
},

getPreviousValue: function() {
return dropDown._previousValue ? dropDown._previousValue : dropDown._selectedItemValue;
},

_setItemPresentationValue:function () {

var selectedItem = dropDown._getSelectedItem();
Expand Down

0 comments on commit 7050713

Please sign in to comment.