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.
- package/controls/JitzGrid.tsx +31 -21
- package/lib/controls/JitzGrid.d.ts +2 -0
- package/lib/controls/JitzGrid.js +6 -5
- package/package.json +1 -1
package/controls/JitzGrid.tsx
CHANGED
@@ -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.
|
447
|
-
<
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
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;
|
package/lib/controls/JitzGrid.js
CHANGED
@@ -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
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
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 &&
|