Skip to content

Commit

Permalink
fix for oldIndex mm-dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonykoerber committed Aug 24, 2015
1 parent ffea571 commit a876d23
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/mm-dropdown/mm-dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
behaviors: [
StrandTraits.Stylable,
StrandTraits.KeySelectable,
// StrandTraits.Stackable,
StrandTraits.Stackable,
StrandTraits.Jqueryable,
StrandTraits.AutoClosable,
StrandTraits.AutoTogglable,
Expand Down Expand Up @@ -261,7 +261,6 @@
// console.log("_selectedIndexChanged:: newIndex: " + newIndex + " | oldIndex: ", oldIndex);
if (typeof newIndex === 'number' && newIndex !== oldIndex) {
var newSelected = this.items[newIndex],
oldSelected = this.items[oldIndex],
value = newSelected.value ? newSelected.value : newSelected.textContent.trim();

this._selectedFlag = true;
Expand All @@ -285,6 +284,8 @@
}

if (typeof oldIndex === 'number' && newIndex !== oldIndex) {
var oldSelected = this.items[oldIndex];

if (this.data) {
this.set('data.' + oldIndex + '.selected', false);
} else {
Expand Down

0 comments on commit a876d23

Please sign in to comment.