Skip to content

Commit

Permalink
Missing exports
Browse files Browse the repository at this point in the history
  • Loading branch information
jassmith committed Feb 8, 2024
1 parent 0e15178 commit b44d01c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/core/src/data-editor/row-grouping-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ import React from "react";
import type { Item } from "../internal/data-grid/data-grid-types.js";
import { flattenRowGroups, mapRowIndexToPath, type RowGroup, type RowGroupingOptions } from "./row-grouping.js";

type RowGroupingMapperResult<T> = {
export type RowGroupingMapperResult<T> = {
path: readonly number[];
originalIndex: T;
isGroupHeader: boolean;
groupRows: number;
};

type RowGroupingMapper = {
export type RowGroupingMapper = {
(itemOrRow: number): RowGroupingMapperResult<number>;
(itemOrRow: Item): RowGroupingMapperResult<Item>;
};

interface UseRowGroupingResult {
export interface UseRowGroupingResult {
readonly mapper: RowGroupingMapper;
readonly updateRowGroupingByPath: (
rowGrouping: readonly RowGroup[],
Expand Down
7 changes: 7 additions & 0 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,14 @@ export { AllCellRenderers } from "./cells/index.js";
export { sprites } from "./internal/data-grid/sprites.js";
export { default as ImageWindowLoaderImpl } from "./common/image-window-loader.js";
export * from "./data-editor/copy-paste.js";

export { useRowGrouping } from "./data-editor/row-grouping-api.js";
export type {
RowGroupingMapper,
RowGroupingMapperResult,
UseRowGroupingResult,
} from "./data-editor/row-grouping-api.js";
export type { RowGroup, RowGroupingOptions } from "./data-editor/row-grouping.js";

/**
* @category DataEditor
Expand Down

0 comments on commit b44d01c

Please sign in to comment.