From d645b29d56b6f68b6a61428428fc0a0404cbf106 Mon Sep 17 00:00:00 2001 From: Akshat Date: Fri, 11 Oct 2024 16:40:53 +0530 Subject: [PATCH] Added JSDoc comments for the DataGrid component to document its props and functionality. --- components/DataGrid/index.tsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/components/DataGrid/index.tsx b/components/DataGrid/index.tsx index e66125ac..31d1d05d 100644 --- a/components/DataGrid/index.tsx +++ b/components/DataGrid/index.tsx @@ -63,6 +63,20 @@ interface paramsType { isVisibleToRole102?: boolean; } +/** + * DataGrid component for rendering a data grid with customizable rows, columns, and various options. + * + * @param {Object} props - The properties object. + * @param {Array} props.rows - The data rows to be displayed in the grid. + * @param {Array} props.columns - The column definitions for the grid. + * @param {Function} props.onCellClick - Callback function to handle cell click events. + * @param {Function} props.getRowId - Function to get the unique identifier for each row. + * @param {boolean} [props.loading=false] - Flag to indicate if the grid is in a loading state. + * @param {boolean} [props.heighted=false] - Flag to control the auto height behavior of the grid. + * @param {boolean} [props.isVisibleToRole102=false] - Flag to control visibility of certain toolbar options for role 102. + * + * @returns {JSX.Element} The rendered data grid component. + */ function Index({ rows, columns,