code: function($item) {
              var index = this.getItemIndex($item);
              if (this.first === index) {
                  this.$first = this.first = null;
              }
              if (this.last === index) {
                  this.$last = this.last = null;
              }
  
              this._deselectItems($item);
          }
docs: Deselect Item