Skip to content

Commit 18973c0

Browse files
authored
fix: pass type arguments to generic grid types (#1968)
1 parent b682812 commit 18973c0

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

packages/vaadin-grid/src/interfaces.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ export type GridDataProviderParams<TItem> = {
2424
parentItem?: TItem;
2525
};
2626

27-
export type GridDataProvider = <TItem>(
27+
export type GridDataProvider<TItem> = (
2828
params: GridDataProviderParams<TItem>,
2929
callback: GridDataProviderCallback<TItem>
3030
) => void;
3131

32-
export type GridDragAndDropFilter = <TItem>(model: GridItemModel<TItem>) => boolean;
32+
export type GridDragAndDropFilter<TItem> = (model: GridItemModel<TItem>) => boolean;
3333

3434
export type GridDropLocation = 'above' | 'on-top' | 'below' | 'empty';
3535

packages/vaadin-grid/src/vaadin-grid-data-provider-mixin.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ interface DataProviderMixin<TItem> {
6565
* are requested, total number of items in the requested sublevel.
6666
* Optional when tree is not used, required for tree.
6767
*/
68-
dataProvider: GridDataProvider | null | undefined;
68+
dataProvider: GridDataProvider<TItem> | null | undefined;
6969

7070
/**
7171
* `true` while data is being requested from the data provider.

packages/vaadin-grid/src/vaadin-grid-drag-and-drop-mixin.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ interface DragAndDropMixin<TItem> {
4040
* - `model.level` Level of the tree represented with a horizontal offset of the toggle button.
4141
* - `model.selected` Selected state.
4242
*/
43-
dragFilter: GridDragAndDropFilter | null | undefined;
43+
dragFilter: GridDragAndDropFilter<TItem> | null | undefined;
4444

4545
/**
4646
* A function that filters dropping on specific grid rows. The return value should be false
@@ -55,7 +55,7 @@ interface DragAndDropMixin<TItem> {
5555
* - `model.level` Level of the tree represented with a horizontal offset of the toggle button.
5656
* - `model.selected` Selected state.
5757
*/
58-
dropFilter: GridDragAndDropFilter | null | undefined;
58+
dropFilter: GridDragAndDropFilter<TItem> | null | undefined;
5959

6060
_clearDragStyles(): void;
6161

0 commit comments

Comments
 (0)