code: 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();
      }
docs: Handles changes to the selected item.
  @param selectedItem
  @param previousSelectedItem