-
-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(typing): add missing item metadata interface
- Loading branch information
1 parent
1fe958c
commit c3eefd0
Showing
6 changed files
with
56 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
src/app/modules/angular-slickgrid/models/itemMetadata.interface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { Editor, Formatter, GroupTotalsFormatter } from './index'; | ||
|
||
/** | ||
* Provides a powerful way of specifying additional information about a data item that let the grid customize the appearance | ||
* and handling of a particular data item. The method should return null if the item requires no special handling, | ||
* or an object following the ItemMetadata interface | ||
*/ | ||
export interface ItemMetadata { | ||
// properties describing metadata related to the item (i.e. grid row) itself | ||
|
||
/** One or more (space-separated) CSS classes to be added to the entire row. */ | ||
cssClasses?: string; | ||
|
||
/** Whether or not any cells in the row can be set as "active". */ | ||
focusable?: boolean; | ||
|
||
/** A custom group formatter. */ | ||
formatter?: GroupTotalsFormatter; | ||
|
||
/** Whether or not a row or any cells in it can be selected. */ | ||
selectable?: boolean; | ||
|
||
/** column-level metadata */ | ||
columns?: { | ||
// properties describing metadata related to individual columns | ||
|
||
[colIdOrIdx in string | number]: { | ||
/** Number of columns this cell will span. Can also contain "*" to indicate that the cell should span the rest of the row. */ | ||
colspan?: number | string | '*'; | ||
|
||
/** A custom cell editor. */ | ||
editor?: Editor | null; | ||
|
||
/** Whether or not a cell can be set as "active". */ | ||
focusable?: boolean; | ||
|
||
/** A custom cell formatter. */ | ||
formatter?: Formatter | GroupTotalsFormatter; | ||
|
||
/** Whether or not a cell can be selected. */ | ||
selectable?: boolean; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters