dist/js/materializecss-autocomplete.js
function selectedItemChange(selectedItem, previousSelectedItem) {
      if (selectedItem) {
        if (self.displayProperty1) {
          self.searchText = selectedItem[self.displayProperty1];
        }
        if (self.parentForm && self.parentForm !== null) {
          self.parentForm.$setDirty();
        }
      }
      else if (previousSelectedItem && self.searchText) {
        if (previousSelectedItem[self.displayProperty1] === self.searchText) {
          self.searchText = '';
        }
      }

      if (selectedItem !== previousSelectedItem) announceItemChange();
    }
function selectedItemChange(selectedItem, previousSelectedItem) {
      if (selectedItem) {
        if (self.displayProperty1) {
          self.searchText = selectedItem[self.displayProperty1];
        }
        if (self.parentForm && self.parentForm !== null) {
          self.parentForm.$setDirty();
        }
      }
      else if (previousSelectedItem && self.searchText) {
        if (previousSelectedItem[self.displayProperty1] === self.searchText) {
          self.searchText = '';
        }
      }

      if (selectedItem !== previousSelectedItem) announceItemChange();
    }
function selectedItemChange ( selectedItem , previousSelectedItem ) { if ( selectedItem ) { if ( self . displayProperty1 ) { self . searchText = selectedItem [ self . displayProperty1 ] ; } if ( self . parentForm && self . parentForm !== null ) { self . parentForm . $setDirty ( ) ; } } else if ( previousSelectedItem && self . searchText ) { if ( previousSelectedItem [ self . displayProperty1 ] === self . searchText ) { self . searchText = '' ; } } if ( selectedItem !== previousSelectedItem ) announceItemChange ( ) ; }
Handles changes to the selected item.
@param selectedItem
@param previousSelectedItem
Handles changes to the selected item .