Skip to content

Commit

Permalink
docs:api
Browse files Browse the repository at this point in the history
  • Loading branch information
lauri865 committed Dec 3, 2024
1 parent eeae8b4 commit 7c30993
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
7 changes: 7 additions & 0 deletions docs/pages/x/api/data-grid/selectors.json
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,13 @@
"description": "Get the visible pinned columns.",
"supportsApiRef": true
},
{
"name": "gridVisibleRowsSelector",
"returnType": "{ rows: GridRowEntry<GridValidRowModel>[]; range: { firstRowIndex: number; lastRowIndex: number } | null; rowToIndexMap: Map<GridValidRowModel, number> }",
"category": "Pagination",
"description": "Get the rows, range and rowIndex lookup map after filtering and sorting.\nDoes not contain the collapsed children.",
"supportsApiRef": true
},
{
"name": "selectedGridRowsCountSelector",
"returnType": "number",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ const ALL_RESULTS_PAGE_VALUE = -1;
export const gridPaginationSelector = (state: GridStateCommunity) => state.pagination;

/**
*
* @category Pagination
* @ignore - do not document.
*/
export const gridPaginationModeClientEnabled = createSelector(
export const gridPaginationEnabledClientSideSelector = createSelector(
gridPaginationSelector,
(pagination) => pagination.enabled && pagination.paginationMode === 'client',
);
Expand Down Expand Up @@ -87,7 +87,7 @@ export const gridPageCountSelector = createSelector(
* @category Pagination
*/
export const gridPaginationRowRangeSelector = createSelectorMemoized(
gridPaginationModeClientEnabled,
gridPaginationEnabledClientSideSelector,
gridPaginationModelSelector,
gridRowTreeSelector,
gridRowMaximumTreeDepthSelector,
Expand Down Expand Up @@ -204,7 +204,7 @@ export const gridPaginatedVisibleSortedGridRowIdsSelector = createSelectorMemoiz
* @category Pagination
*/
export const gridVisibleRowsSelector = createSelectorMemoized(
gridPaginationModeClientEnabled,
gridPaginationEnabledClientSideSelector,
gridPaginationRowRangeSelector,
gridPaginatedVisibleSortedGridRowEntriesSelector,
gridExpandedSortedRowEntriesSelector,
Expand Down
2 changes: 2 additions & 0 deletions scripts/x-data-grid-premium.exports.json
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@
{ "name": "gridPaginatedVisibleSortedGridRowIdsSelector", "kind": "Variable" },
{ "name": "GridPagination", "kind": "Variable" },
{ "name": "GridPaginationApi", "kind": "Interface" },
{ "name": "gridPaginationEnabledClientSideSelector", "kind": "Variable" },
{ "name": "GridPaginationInitialState", "kind": "Interface" },
{ "name": "GridPaginationMeta", "kind": "Interface" },
{ "name": "gridPaginationMetaSelector", "kind": "Variable" },
Expand Down Expand Up @@ -638,6 +639,7 @@
{ "name": "gridVisibleColumnFieldsSelector", "kind": "Variable" },
{ "name": "gridVisiblePinnedColumnDefinitionsSelector", "kind": "Variable" },
{ "name": "gridVisibleRowsLookupSelector", "kind": "Variable" },
{ "name": "gridVisibleRowsSelector", "kind": "Variable" },
{ "name": "GridWorkspacesIcon", "kind": "Variable" },
{ "name": "isAutogeneratedRow", "kind": "Variable" },
{ "name": "isGroupingColumn", "kind": "ImportSpecifier" },
Expand Down
2 changes: 2 additions & 0 deletions scripts/x-data-grid-pro.exports.json
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@
{ "name": "gridPaginatedVisibleSortedGridRowIdsSelector", "kind": "Variable" },
{ "name": "GridPagination", "kind": "Variable" },
{ "name": "GridPaginationApi", "kind": "Interface" },
{ "name": "gridPaginationEnabledClientSideSelector", "kind": "Variable" },
{ "name": "GridPaginationInitialState", "kind": "Interface" },
{ "name": "GridPaginationMeta", "kind": "Interface" },
{ "name": "gridPaginationMetaSelector", "kind": "Variable" },
Expand Down Expand Up @@ -589,6 +590,7 @@
{ "name": "gridVisibleColumnFieldsSelector", "kind": "Variable" },
{ "name": "gridVisiblePinnedColumnDefinitionsSelector", "kind": "Variable" },
{ "name": "gridVisibleRowsLookupSelector", "kind": "Variable" },
{ "name": "gridVisibleRowsSelector", "kind": "Variable" },
{ "name": "isAutogeneratedRow", "kind": "Variable" },
{ "name": "isLeaf", "kind": "Function" },
{ "name": "LicenseInfo", "kind": "Class" },
Expand Down
2 changes: 2 additions & 0 deletions scripts/x-data-grid.exports.json
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@
{ "name": "gridPaginatedVisibleSortedGridRowIdsSelector", "kind": "Variable" },
{ "name": "GridPagination", "kind": "Variable" },
{ "name": "GridPaginationApi", "kind": "Interface" },
{ "name": "gridPaginationEnabledClientSideSelector", "kind": "Variable" },
{ "name": "GridPaginationInitialState", "kind": "Interface" },
{ "name": "GridPaginationMeta", "kind": "Interface" },
{ "name": "gridPaginationMetaSelector", "kind": "Variable" },
Expand Down Expand Up @@ -538,6 +539,7 @@
{ "name": "gridVisibleColumnFieldsSelector", "kind": "Variable" },
{ "name": "gridVisiblePinnedColumnDefinitionsSelector", "kind": "Variable" },
{ "name": "gridVisibleRowsLookupSelector", "kind": "Variable" },
{ "name": "gridVisibleRowsSelector", "kind": "Variable" },
{ "name": "isAutogeneratedRow", "kind": "Variable" },
{ "name": "isLeaf", "kind": "Function" },
{ "name": "LoadingOverlayPropsOverrides", "kind": "Interface" },
Expand Down

0 comments on commit 7c30993

Please sign in to comment.