mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 13:00:19 +00:00
Added uiGridConstants.scrollbars.WHEN_NEEDED
The option is documented here: http://ui-grid.info/docs/#!/api/ui.grid.service:uiGridConstants#properties_scrollbars
This commit is contained in:
Vendored
+4
-3
@@ -127,6 +127,7 @@ declare namespace uiGrid {
|
||||
scrollbars: {
|
||||
NEVER: number;
|
||||
ALWAYS: number;
|
||||
WHEN_NEEDED: number;
|
||||
};
|
||||
}
|
||||
export type IGridInstance = IGridInstanceOf<any>;
|
||||
@@ -627,7 +628,7 @@ declare namespace uiGrid {
|
||||
enableGridMenu?: boolean;
|
||||
/**
|
||||
* uiGridConstants.scrollbars.ALWAYS by default. This settings controls the horizontal scrollbar for the grid.
|
||||
* Supported values: uiGridConstants.scrollbars.ALWAYS, uiGridConstants.scrollbars.NEVER
|
||||
* Supported values: uiGridConstants.scrollbars.ALWAYS, uiGridConstants.scrollbars.NEVER, uiGridConstants.scrollbars.WHEN_NEEDED
|
||||
* @default 1
|
||||
*/
|
||||
enableHorizontalScrollbar?: boolean | number;
|
||||
@@ -660,7 +661,7 @@ declare namespace uiGrid {
|
||||
enableSorting?: boolean;
|
||||
/**
|
||||
* uiGridConstants.scrollbars.ALWAYS by default. This settings controls the vertical scrollbar for the grid.
|
||||
* Supported values: uiGridConstants.scrollbars.ALWAYS, uiGridConstants.scrollbars.NEVER
|
||||
* Supported values: uiGridConstants.scrollbars.ALWAYS, uiGridConstants.scrollbars.NEVER, uiGridConstants.scrollbars.WHEN_NEEDED
|
||||
* @default 1
|
||||
*/
|
||||
enableVerticalScrollbar?: boolean | number;
|
||||
@@ -897,7 +898,7 @@ declare namespace uiGrid {
|
||||
* which is provided when you want to remove an item. The id should be unique.
|
||||
|
||||
*/
|
||||
addToGridMenu(grid: IGridInstanceOf<TEntity>, items: Array<IMenuItem>): void;
|
||||
addToGridMenu(grid: IGridInstanceOf<TEntity>, items: Array<IMenuItem>): void;
|
||||
/**
|
||||
* Clears all filters and optionally refreshes the visible rows.
|
||||
* @param {boolean} [refreshRows=true] Defaults to true.
|
||||
|
||||
@@ -98,7 +98,7 @@ columnDef.sort = {
|
||||
priority: 1
|
||||
};
|
||||
columnDef.sortCellFiltered = false;
|
||||
columnDef.sortDirectionCycle = [null, 'asc' , 'desc'];
|
||||
columnDef.sortDirectionCycle = [null, 'asc', 'desc'];
|
||||
columnDef.sortingAlgorithm = (a: any, b: any, rowA: uiGrid.IGridRowOf<IMyEntity>, rowB: uiGrid.IGridRowOf<IMyEntity>, direction: string) => {
|
||||
return -1;
|
||||
};
|
||||
@@ -113,6 +113,7 @@ var gridApi: uiGrid.IGridApiOf<IMyEntity>;
|
||||
var gridInstance: uiGrid.IGridInstanceOf<IMyEntity>;
|
||||
var menuItem: uiGrid.IMenuItem;
|
||||
var colProcessor: uiGrid.IColumnProcessor<IMyEntity>;
|
||||
var uiGridConstants: uiGrid.IUiGridConstants;
|
||||
|
||||
gridApi.core.clearAllFilters(true);
|
||||
gridApi.core.addToGridMenu(gridInstance, [menuItem]);
|
||||
@@ -131,6 +132,12 @@ var gridOptions: uiGrid.IGridOptionsOf<IMyEntity> = {
|
||||
}
|
||||
};
|
||||
gridOptions.isRowSelectable = () => true;
|
||||
gridOptions.enableVerticalScrollbar = uiGridConstants.scrollbars.ALWAYS;
|
||||
gridOptions.enableVerticalScrollbar = uiGridConstants.scrollbars.WHEN_NEEDED;
|
||||
gridOptions.enableVerticalScrollbar = uiGridConstants.scrollbars.NEVER;
|
||||
gridOptions.enableHorizontalScrollbar = uiGridConstants.scrollbars.ALWAYS;
|
||||
gridOptions.enableHorizontalScrollbar = uiGridConstants.scrollbars.WHEN_NEEDED;
|
||||
gridOptions.enableHorizontalScrollbar = uiGridConstants.scrollbars.NEVER;
|
||||
|
||||
interface IAnotherEntity {
|
||||
anObject: string
|
||||
|
||||
Reference in New Issue
Block a user