jitz-sharepoint-utilities 2.0.19 → 2.0.21
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 +29 -19
- package/lib/controls/JitzGrid.d.ts +2 -0
- package/lib/controls/JitzGrid.js +7 -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<
|
@@ -444,25 +446,33 @@ export class JitzGrid<T extends IModel> extends React.Component<
|
|
444
446
|
<div className="ms-Grid-row">
|
445
447
|
<div className="ms-Grid-col ms-sm12 ms-md12 ms-lg12">
|
446
448
|
{this.state.displayMode === DisplayMode.Grid && (
|
447
|
-
<
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
449
|
+
<div className={this.props.outerGridClass || ""}>
|
450
|
+
<div className={this.props.fixedGridWidthCss || ""}>
|
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
|
+
</div>
|
475
|
+
</div>
|
466
476
|
)}
|
467
477
|
{this.state.displayMode === DisplayMode.Tile &&
|
468
478
|
this.state.showingItems != undefined &&
|
@@ -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,13 @@ 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(
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
570
|
+
this.state.displayMode === DisplayMode.Grid && (React.createElement("div", { className: this.props.outerGridClass || "" },
|
571
|
+
React.createElement("div", { className: this.props.fixedGridWidthCss || "" },
|
572
|
+
React.createElement(react_1.DetailsList, { items: this.state.showingItems != undefined
|
573
|
+
? this.state.showingItems
|
574
|
+
: [], 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) {
|
575
|
+
_this.itemSelected(item, index);
|
576
|
+
}, selectionMode: this.props.selectionMode || react_1.SelectionMode.none, selection: this._selection })))),
|
575
577
|
this.state.displayMode === DisplayMode.Tile &&
|
576
578
|
this.state.showingItems != undefined &&
|
577
579
|
this.state.showingItems.length > 0 &&
|