src/aria/widgets/form/list/ListController.js
function (selectedIdx) {
            if (!this._navigationEvent) { // will not override any selections using arrow keys or mouse over
                if (this._data.preselect === "none") {
                    return null;
                } else if (this._data.preselect === "always") {
                    if (selectedIdx === -1 || selectedIdx === undefined) {
                        selectedIdx = 0;
                    }
                    return selectedIdx;
                }
            } else {
                this._navigationEvent = false;
            }
        }
function (selectedIdx) {
            if (!this._navigationEvent) { // will not override any selections using arrow keys or mouse over
                if (this._data.preselect === "none") {
                    return null;
                } else if (this._data.preselect === "always") {
                    if (selectedIdx === -1 || selectedIdx === undefined) {
                        selectedIdx = 0;
                    }
                    return selectedIdx;
                }
            } else {
                this._navigationEvent = false;
            }
        }
function ( selectedIdx ) { if ( ! this . _navigationEvent ) { // will not override any selections using arrow keys or mouse over if ( this . _data . preselect === "none" ) { return null ; } else if ( this . _data . preselect === "always" ) { if ( selectedIdx === - 1 || selectedIdx === undefined ) { selectedIdx = 0 ; } return selectedIdx ; } } else { this . _navigationEvent = false ; } }
Return the item that should be preselected depending on the navigation event
@param {Integer} selectedIdx selected option index
@protected
@return {Integer} Item position or null if nothing should be preselected
Return the item that should be preselected depending on the navigation event