Skip to content

Commit

Permalink
feat(plugins): add Row Detail plugin final code & tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding committed Nov 6, 2021
1 parent 160d05e commit 045ea6d
Show file tree
Hide file tree
Showing 4 changed files with 925 additions and 192 deletions.
15 changes: 15 additions & 0 deletions packages/common/src/interfaces/rowDetailViewOption.interface.ts
Expand Up @@ -2,12 +2,18 @@ import { UsabilityOverrideFn } from '../index';
import { Observable, Subject } from '../services/rxjsFacade';

export interface RowDetailViewOption {
/** Defaults to True, do we always render/reRender the column */
alwaysRenderColumn?: boolean;

/** Defaults to true, which will collapse all row detail views when user calls a sort. Unless user implements a sort to deal with padding */
collapseAllOnSort?: boolean;

/** Extra classes to be added to the collapse Toggle */
collapsedClass?: string;

/** Defaults to "_detail_selector", Row Detail column Id */
columnId?: string;

/**
* Defaults to 0, the column index position in the grid by default it will show as the first column (index 0).
* Also note that the index position might vary if you use other extensions, after each extension is created,
Expand All @@ -27,6 +33,9 @@ export interface RowDetailViewOption {
/** Defaults to false, when True will load the data once and then reuse it. */
loadOnce?: boolean;

/** Defaults to null, do we want to defined a maximum number of rows to show. */
maxRows?: number;

/**
* How many grid rows do we want to use for the detail panel view
* also note that the detail view adds an extra 1 row for padding purposes
Expand Down Expand Up @@ -55,6 +64,12 @@ export interface RowDetailViewOption {
*/
useSimpleViewportCalc?: boolean;

/** no defaults, show a tooltip text while hovering the row detail icon */
toolTip?: string;

/** no defaults, width of the icon column */
width?: number;

// --
// Callback Methods

Expand Down
Expand Up @@ -34,7 +34,7 @@ export interface SlickRowDetailView {
getColumnDefinition(): Column;

/** Get the row expandable Override function */
getExpandableOverride(): UsabilityOverrideFn;
getExpandableOverride(): UsabilityOverrideFn | null;

/** return the currently expanded rows */
getExpandedRows(): Array<number | string>;
Expand Down

0 comments on commit 045ea6d

Please sign in to comment.