jitz-sharepoint-utilities 2.0.19 → 2.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -76,6 +76,8 @@ export interface IJitzGridProps<T extends IModel> {
76
76
  refreshedOn?: Date;
77
77
  displayMode?: DisplayMode;
78
78
  downloadFileName?: string;
79
+ outerGridClass?: string;
80
+ fixedGridWidthCss?: string;
79
81
  }
80
82
 
81
83
  export class JitzGrid<T extends IModel> extends React.Component<
@@ -443,27 +445,35 @@ export class JitzGrid<T extends IModel> extends React.Component<
443
445
  this.state.showingItems.length > 0) && (
444
446
  <div className="ms-Grid-row">
445
447
  <div className="ms-Grid-col ms-sm12 ms-md12 ms-lg12">
446
- {this.state.displayMode === DisplayMode.Grid && (
447
- <DetailsList
448
- items={
449
- this.state.showingItems != undefined
450
- ? this.state.showingItems
451
- : []
452
- }
453
- setKey={"Id"}
454
- columns={this.state.columns}
455
- onRenderItemColumn={this._renderItemColumn}
456
- onColumnHeaderClick={this._onColumnClick}
457
- onItemInvoked={this._onItemInvoked}
458
- onShouldVirtualize={() => false}
459
- onColumnHeaderContextMenu={this._onColumnHeaderContextMenu}
460
- onActiveItemChanged={(item: any, index?: number) => {
461
- this.itemSelected(item, index);
462
- }}
463
- selectionMode={this.props.selectionMode || SelectionMode.none}
464
- selection={this._selection}
465
- />
466
- )}
448
+ <div className={this.props.outerGridClass || ""}>
449
+ <div className={this.props.fixedGridWidthCss || ""}>
450
+ {this.state.displayMode === DisplayMode.Grid && (
451
+ <DetailsList
452
+ items={
453
+ this.state.showingItems != undefined
454
+ ? this.state.showingItems
455
+ : []
456
+ }
457
+ setKey={"Id"}
458
+ columns={this.state.columns}
459
+ onRenderItemColumn={this._renderItemColumn}
460
+ onColumnHeaderClick={this._onColumnClick}
461
+ onItemInvoked={this._onItemInvoked}
462
+ onShouldVirtualize={() => false}
463
+ onColumnHeaderContextMenu={
464
+ this._onColumnHeaderContextMenu
465
+ }
466
+ onActiveItemChanged={(item: any, index?: number) => {
467
+ this.itemSelected(item, index);
468
+ }}
469
+ selectionMode={
470
+ this.props.selectionMode || SelectionMode.none
471
+ }
472
+ selection={this._selection}
473
+ />
474
+ )}
475
+ </div>
476
+ </div>
467
477
  {this.state.displayMode === DisplayMode.Tile &&
468
478
  this.state.showingItems != undefined &&
469
479
  this.state.showingItems.length > 0 &&
@@ -51,6 +51,8 @@ export interface IJitzGridProps<T extends IModel> {
51
51
  refreshedOn?: Date;
52
52
  displayMode?: DisplayMode;
53
53
  downloadFileName?: string;
54
+ outerGridClass?: string;
55
+ fixedGridWidthCss?: string;
54
56
  }
55
57
  export declare class JitzGrid<T extends IModel> extends React.Component<IJitzGridProps<T>, IJitzGridState<T>> {
56
58
  private _selection;
@@ -567,11 +567,12 @@ var JitzGrid = /** @class */ (function (_super) {
567
567
  (this.state.showingItems == undefined ||
568
568
  this.state.showingItems.length > 0) && (React.createElement("div", { className: "ms-Grid-row" },
569
569
  React.createElement("div", { className: "ms-Grid-col ms-sm12 ms-md12 ms-lg12" },
570
- this.state.displayMode === DisplayMode.Grid && (React.createElement(react_1.DetailsList, { items: this.state.showingItems != undefined
571
- ? this.state.showingItems
572
- : [], setKey: "Id", columns: this.state.columns, onRenderItemColumn: this._renderItemColumn, onColumnHeaderClick: this._onColumnClick, onItemInvoked: this._onItemInvoked, onShouldVirtualize: function () { return false; }, onColumnHeaderContextMenu: this._onColumnHeaderContextMenu, onActiveItemChanged: function (item, index) {
573
- _this.itemSelected(item, index);
574
- }, selectionMode: this.props.selectionMode || react_1.SelectionMode.none, selection: this._selection })),
570
+ React.createElement("div", { className: this.props.outerGridClass || "" },
571
+ React.createElement("div", { className: this.props.fixedGridWidthCss || "" }, this.state.displayMode === DisplayMode.Grid && (React.createElement(react_1.DetailsList, { items: this.state.showingItems != undefined
572
+ ? this.state.showingItems
573
+ : [], setKey: "Id", columns: this.state.columns, onRenderItemColumn: this._renderItemColumn, onColumnHeaderClick: this._onColumnClick, onItemInvoked: this._onItemInvoked, onShouldVirtualize: function () { return false; }, onColumnHeaderContextMenu: this._onColumnHeaderContextMenu, onActiveItemChanged: function (item, index) {
574
+ _this.itemSelected(item, index);
575
+ }, selectionMode: this.props.selectionMode || react_1.SelectionMode.none, selection: this._selection })))),
575
576
  this.state.displayMode === DisplayMode.Tile &&
576
577
  this.state.showingItems != undefined &&
577
578
  this.state.showingItems.length > 0 &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jitz-sharepoint-utilities",
3
- "version": "2.0.19",
3
+ "version": "2.0.20",
4
4
  "description": "Essential SharePoint utilities for SharePoint Add-in and SPFx development",
5
5
  "author": "Jithendra Mani",
6
6
  "license": "ISC",