src/aria/widgets/controllers/MultiAutoCompleteController.js
function (selectedValues) {
                var selectedValuesCopy = ariaUtilsJson.copy(selectedValues, false);
                var selectedSuggestionsCopy = ariaUtilsJson.copy(this.selectedSuggestions, false);
                for (var i = 0, l = selectedSuggestionsCopy.length; i < l; i++) {
                    var curSelectedSuggestion = selectedSuggestionsCopy[i];
                    if (typeUtil.isObject(curSelectedSuggestion)) {
                        var index = this._findSuggestion(selectedValuesCopy, curSelectedSuggestion);
                        if (index > -1) {
                            arrayUtil.removeAt(selectedValuesCopy, index);
                        } else {
                            arrayUtil.removeAt(selectedSuggestionsCopy, i);
                            l--;
                            i--;
                        }
                    }
                }
                selectedSuggestionsCopy = selectedSuggestionsCopy.concat(selectedValuesCopy);
                var report = this.checkValue(selectedSuggestionsCopy);
                this._isExpanded = true;
                report.repositionDropDown = true;
                return report;
            }
function (selectedValues) {
                var selectedValuesCopy = ariaUtilsJson.copy(selectedValues, false);
                var selectedSuggestionsCopy = ariaUtilsJson.copy(this.selectedSuggestions, false);
                for (var i = 0, l = selectedSuggestionsCopy.length; i < l; i++) {
                    var curSelectedSuggestion = selectedSuggestionsCopy[i];
                    if (typeUtil.isObject(curSelectedSuggestion)) {
                        var index = this._findSuggestion(selectedValuesCopy, curSelectedSuggestion);
                        if (index > -1) {
                            arrayUtil.removeAt(selectedValuesCopy, index);
                        } else {
                            arrayUtil.removeAt(selectedSuggestionsCopy, i);
                            l--;
                            i--;
                        }
                    }
                }
                selectedSuggestionsCopy = selectedSuggestionsCopy.concat(selectedValuesCopy);
                var report = this.checkValue(selectedSuggestionsCopy);
                this._isExpanded = true;
                report.repositionDropDown = true;
                return report;
            }
function ( selectedValues ) { var selectedValuesCopy = ariaUtilsJson . copy ( selectedValues , false ) ; var selectedSuggestionsCopy = ariaUtilsJson . copy ( this . selectedSuggestions , false ) ; for ( var i = 0 , l = selectedSuggestionsCopy . length ; i < l ; i ++ ) { var curSelectedSuggestion = selectedSuggestionsCopy [ i ] ; if ( typeUtil . isObject ( curSelectedSuggestion ) ) { var index = this . _findSuggestion ( selectedValuesCopy , curSelectedSuggestion ) ; if ( index > - 1 ) { arrayUtil . removeAt ( selectedValuesCopy , index ) ; } else { arrayUtil . removeAt ( selectedSuggestionsCopy , i ) ; l -- ; i -- ; } } } selectedSuggestionsCopy = selectedSuggestionsCopy . concat ( selectedValuesCopy ) ; var report = this . checkValue ( selectedSuggestionsCopy ) ; this . _isExpanded = true ; report . repositionDropDown = true ; return report ; }
Updates selected values.
@param {Array} values
Updates selected values .