From 09899fbbc6f6be189c1499601c7a78214edc1374 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Sat, 17 Aug 2024 23:44:11 +0200 Subject: [PATCH] [core] Follow JSDocs convention --- docs/data/data-grid/server-side-data/index.md | 2 +- packages/x-data-grid/src/models/gridDataSource.ts | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/data/data-grid/server-side-data/index.md b/docs/data/data-grid/server-side-data/index.md index 106b1737b7c3..a53d755dd72d 100644 --- a/docs/data/data-grid/server-side-data/index.md +++ b/docs/data/data-grid/server-side-data/index.md @@ -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} A promise that resolves to the data of type [GridGetRowsResponse] */ diff --git a/packages/x-data-grid/src/models/gridDataSource.ts b/packages/x-data-grid/src/models/gridDataSource.ts index f2a26241b659..44bd45159349 100644 --- a/packages/x-data-grid/src/models/gridDataSource.ts +++ b/packages/x-data-grid/src/models/gridDataSource.ts @@ -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} A promise that resolves to the data of type [GridGetRowsResponse] */ getRows(params: GridGetRowsParams): Promise; /** - * 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} If resolved (synced on the backend), the grid will update the row and mutate the cache */ updateRow?(updatedRow: GridRowModel): Promise; /** - * 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 */ @@ -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; }