Skip to content

Commit

Permalink
ag-grid组件支持style属性
Browse files Browse the repository at this point in the history
  • Loading branch information
yinlianghui committed Dec 25, 2024
1 parent 62bc37a commit d629d8e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/@steedos-widgets/ag-grid/src/components/AgGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: 殷亮辉 [email protected]
* @Date: 2024-01-18 18:58:37
* @LastEditors: 殷亮辉 [email protected]
* @LastEditTime: 2024-12-12 17:36:50
* @LastEditTime: 2024-12-25 09:02:40
*/
import React, { useEffect, useState, useRef } from 'react';
import { AG_GRID_LOCALE_CN } from '@ag-grid-community/locale';
Expand All @@ -12,7 +12,8 @@ export const AmisAgGrid = (props: any) => {
config: configJSON = null,
data: amisData = {},
className,
dataFilter
dataFilter,
style
} = props;
const initConfig = Object.assign({ localeText: AG_GRID_LOCALE_CN }, configJSON || {});
const [config, setConfig] = useState(initConfig);
Expand Down Expand Up @@ -59,6 +60,6 @@ export const AmisAgGrid = (props: any) => {
}

return (
<div ref={wrapperRef} className={`${className} ag-theme-quartz`} />
<div ref={wrapperRef} className={`${className} ag-theme-quartz`} style={style} />
)
};

0 comments on commit d629d8e

Please sign in to comment.