anamitraadhikari commented on PR #41031:
URL: https://github.com/apache/superset/pull/41031#issuecomment-4900598242

   > The suggestion to replace `any` with a more specific type is correct, as 
using `any` bypasses TypeScript's type safety. You can resolve this by defining 
a specific interface for the grid theme overrides instead of using 
`Record<string, any>`.
   > 
   > To implement this, define an interface that matches the expected structure 
of the overrides, for example:
   > 
   > ```ts
   > interface GridThemeOverrides {
   >   headerFontSize?: number;
   >   headerFontWeight?: number;
   >   rowHeight?: number;
   >   borderRadius?: number;
   > }
   > 
   > const resultsGridThemeOverrides = useMemo<GridThemeOverrides | 
undefined>(() => {
   >   const overrides: GridThemeOverrides = {};
   >   // ... logic remains the same
   > }, [theme]);
   > ```
   > 
   > There are no other review comments in this pull request. Would you like me 
to assist with any other parts of the code?
   > 
   > **superset-frontend/src/SqlLab/components/ResultSet/index.tsx**
   > 
   > ```
   > interface GridThemeOverrides {
   >   headerFontSize?: number;
   >   headerFontWeight?: number;
   >   rowHeight?: number;
   >   borderRadius?: number;
   > }
   > 
   > const resultsGridThemeOverrides = useMemo<GridThemeOverrides | 
undefined>(() => {
   >   const overrides: GridThemeOverrides = {};
   > ```
   
   Created GridThemeOverrides interface in src/components/GridTable/types.ts 
and applied it to all themeOverrides props.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to