_onFilterChanged(filterText) {
      if (filterText) {
         //First, create a list of suggestions that match the filter text
         var filteredList = this.filterPersonasByText(filterText);

         //Now, remove duplicates of already selected people
         filteredList = this.removeDuplicates(filteredList, this.state.selectedItems);

         filteredList.sort(function (a, b) {
            var x = a.text.toLowerCase();
            var y = b.text.toLowerCase();
            if (x < y) { return -1; }
            if (x > y) { return 1; }
            return 0;
         });

         return filteredList;
      }

      //If we made it this far, then lets send an empty array.
      return [];
   }
/**
    * Returns a Persona params object from the current list of Personas.
    * REQUIRED - Supports the onResolveSuggestions workflow. 
    * @param {string} filterText 
    * @returns {Array} A filtered array of Personas suitable for displaying in the Suggestions list.
    */
Returns a Persona params object from the current list of Personas.
REQUIRED - Supports the onResolveSuggestions workflow.
@param {string} filterText
@returns {Array} A filtered array of Personas suitable for displaying in the Suggestions list.
Returns a Persona params object from the current list of Personas . REQUIRED - Supports the onResolveSuggestions workflow . @param { string } filterText @returns { Array } A filtered array of Personas suitable for displaying in the Suggestions list .
_onFilterChanged(filterText) {
      if (filterText) {
         var filteredList = this.filterPersonasByText(filterText);
         filteredList = this.removeDuplicates(filteredList, this.state.selectedItems);
         filteredList.sort(function (a, b) {
            var x = a.text.toLowerCase();
            var y = b.text.toLowerCase();
            if (x < y) { return -1; }
            if (x > y) { return 1; }
            return 0;
         });
         return filteredList;
      }
      return [];
   }
_onFilterChanged ( filterText ) { if ( filterText ) { var filteredList = this . filterPersonasByText ( filterText ) ; filteredList = this . removeDuplicates ( filteredList , this . state . selectedItems ) ; filteredList . sort ( function ( a , b ) { var x = a . text . toLowerCase ( ) ; var y = b . text . toLowerCase ( ) ; if ( x < y ) { return - 1 ; } if ( x > y ) { return 1 ; } return 0 ; } ) ; return filteredList ; } return [ ] ; }
Returns a Persona params object from the current list of Personas.
Returns a Persona params object from the current list of Personas .
//First, create a list of suggestions that match the filter text //Now, remove duplicates of already selected people //If we made it this far, then lets send an empty array.