ker/mod/tfw.view.combo.js
function manageIfFewItems() {
    const itemsCount = getLength.call( this, this.items );
    if ( itemsCount < 2 ) return true;
    if ( itemsCount === 2 ) {
        this.index = 1 - this.index;
        this.expanded = false;
        return true;
    }
    // More than 2 items to manage.
    return false;
}
function manageIfFewItems() {
    const itemsCount = getLength.call( this, this.items );
    if ( itemsCount < 2 ) return true;
    if ( itemsCount === 2 ) {
        this.index = 1 - this.index;
        this.expanded = false;
        return true;
    }
    // More than 2 items to manage.
    return false;
}
function manageIfFewItems ( ) { const itemsCount = getLength . call ( this , this . items ) ; if ( itemsCount < 2 ) return true ; if ( itemsCount === 2 ) { this . index = 1 - this . index ; this . expanded = false ; return true ; } // More than 2 items to manage. return false ; }
For two items, we never show the whole list, but we just change the selection on click.
@this ViewXJS
@returns {boolean} `true` if there are at most 2 items.
For two items we never show the whole list but we just change the selection on click .