Skip to content

Commit

Permalink
chore: align some interface types with SlickGrid
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding committed Jul 22, 2023
1 parent 5dea081 commit a5895d3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions packages/common/src/interfaces/slickDataView.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,7 @@ export interface SlickDataView {
setGrouping(groupingInfo: Grouping | Grouping[]): void;

/** Set a Filter that will be used by the DataView */
// eslint-disable-next-line @typescript-eslint/ban-types
setFilter(filterFn: Function): void;
setFilter(filterFn: ((item1: any, item2: any) => boolean)): void;

/** Set extra Filter arguments which will be used by the Filter method */
setFilterArgs(args: any): void;
Expand Down
10 changes: 5 additions & 5 deletions packages/row-detail-view-plugin/src/slickRowDetailView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ export class SlickRowDetailView implements ExternalResource, UniversalRowDetailV
field: '_detail_selector',
cssClass: 'detailView-toggle',
collapseAllOnSort: true,
collapsedClass: null,
expandedClass: null,
collapsedClass: undefined,
expandedClass: undefined,
keyPrefix: '_',
loadOnce: false,
maxRows: null,
maxRows: undefined,
saveDetailViewOnScroll: true,
singleRowExpand: false,
useSimpleViewportCalc: false,
Expand Down Expand Up @@ -437,7 +437,7 @@ export class SlickRowDetailView implements ExternalResource, UniversalRowDetailV
item[`${this._keyPrefix}height`] = itemHeight;

let outterHeight = (item[`${this._keyPrefix}sizePadding`] * rowHeight);
if (this._addonOptions.maxRows !== null && item[`${this._keyPrefix}sizePadding`] > this._addonOptions.maxRows!) {
if (this._addonOptions.maxRows !== undefined && item[`${this._keyPrefix}sizePadding`] > this._addonOptions.maxRows) {
outterHeight = this._addonOptions.maxRows! * rowHeight;
item[`${this._keyPrefix}sizePadding`] = this._addonOptions.maxRows;
}
Expand Down Expand Up @@ -620,7 +620,7 @@ export class SlickRowDetailView implements ExternalResource, UniversalRowDetailV
}
return `<div class="${collapsedClasses.trim()}"></div>`;
} else {
const html = [];
const html: string[] = [];
const rowHeight = this.gridOptions.rowHeight || 0;
let outterHeight = (dataContext[`${this._keyPrefix}sizePadding`] || 0) * this.gridOptions.rowHeight!;

Expand Down

0 comments on commit a5895d3

Please sign in to comment.