Skip to content

Commit

Permalink
[core] Follow JSDocs convention
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Aug 17, 2024
1 parent 0cb2044 commit 09899fb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/data/data-grid/server-side-data/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Let's take a look at the minimal `GridDataSource` interface configuration.
```tsx
interface GridDataSource {
/**
* This method will be called when the grid needs to fetch some rows
* This method will be called when the grid needs to fetch some rows.
* @param {GridGetRowsParams} params The parameters required to fetch the rows
* @returns {Promise<GridGetRowsResponse>} A promise that resolves to the data of type [GridGetRowsResponse]
*/
Expand Down
12 changes: 6 additions & 6 deletions packages/x-data-grid/src/models/gridDataSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,19 @@ export interface GridGetRowsResponse {

export interface GridDataSource {
/**
* This method will be called when the grid needs to fetch some rows
* This method will be called when the grid needs to fetch some rows.
* @param {GridGetRowsParams} params The parameters required to fetch the rows
* @returns {Promise<GridGetRowsResponse>} A promise that resolves to the data of type [GridGetRowsResponse]
*/
getRows(params: GridGetRowsParams): Promise<GridGetRowsResponse>;
/**
* This method will be called when the user updates a row [Not yet implemented]
* This method will be called when the user updates a row [Not yet implemented].
* @param {GridRowModel} updatedRow The updated row
* @returns {Promise<any>} If resolved (synced on the backend), the grid will update the row and mutate the cache
*/
updateRow?(updatedRow: GridRowModel): Promise<any>;
/**
* Used to group rows by their parent group. Replaces `getTreeDataPath` used in client side tree-data .
* Used to group rows by their parent group. Replaces `getTreeDataPath` used in client side tree-data.
* @param {GridRowModel} row The row to get the group key of
* @returns {string} The group key for the row
*/
Expand All @@ -80,19 +80,19 @@ export interface GridDataSource {

export interface GridDataSourceCache {
/**
* Set the cache entry for the given key
* Set the cache entry for the given key.
* @param {GridGetRowsParams} key The key of type `GridGetRowsParams`
* @param {GridGetRowsResponse} value The value to be stored in the cache
*/
set: (key: GridGetRowsParams, value: GridGetRowsResponse) => void;
/**
* Get the cache entry for the given key
* Get the cache entry for the given key.
* @param {GridGetRowsParams} key The key of type `GridGetRowsParams`
* @returns {GridGetRowsResponse} The value stored in the cache
*/
get: (key: GridGetRowsParams) => GridGetRowsResponse | undefined;
/**
* Clear the cache
* Clear the cache.
*/
clear: () => void;
}

0 comments on commit 09899fb

Please sign in to comment.