code: function _LayoutCommon_setMaxRowsOrColumns(value) {
                      if (value === this._maxRowsOrColumns || this._inListMode) {
                          return;
                      }
  
                      // If container size is unavailable then we do not need to compute itemsPerBar
                      // as it will be computed along with the container size.
                      if (this._sizes && this._sizes.containerSizeLoaded) {
                          this._itemsPerBar = Math.floor(this._sizes.maxItemsContainerContentSize / this._sizes.containerCrossSize);
                          if (value) {
                              this._itemsPerBar = Math.min(this._itemsPerBar, value);
                          }
                          this._itemsPerBar = Math.max(1, this._itemsPerBar);
                      }
                      this._maxRowsOrColumns = value;
  
                      this._invalidateLayout();
                  }
docs: Private methods