
Security News
Open Source CAI Framework Handles Pen Testing Tasks up to 3,600× Faster Than Humans
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
@antv/s2-react-components
Advanced tools
$ pnpm add @antv/s2-react-components
# npm install @antv/s2-react-components --save
# yarn add @antv/s2-react-components
import React from 'React'
import { ThemePanel, TextAlignPanel, FrozenPanel } from '@antv/s2-react-components'
import '@antv/s2-react-components/dist/s2-react-components.min.css'
const App = () => {
return (
<>
<ThemePanel
title="主题配置"
disableCustomPrimaryColorPicker={false}
defaultCollapsed={false}
onChange={(options, theme) => {
console.log('onChange:', options, theme);
}}
onReset={(options, prevOptions, theme) => {
console.log('onReset:', options, prevOptions, theme);
}}
/>
<TextAlignPanel
title="文字对齐"
defaultCollapsed={false}
onChange={(options, theme) => {
console.log('onChange:', options, theme);
}}
onReset={(options, prevOptions, theme) => {
console.log('onReset:', options, prevOptions, theme);
}}
/>
<FrozenPanel
title="冻结行列头"
defaultCollapsed={false}
onChange={(options) => {
console.log('onChange:', options);
}}
onReset={(options, prevOptions) => {
console.log('onReset:', options, prevOptions);
}}
/>
</>
)
}
import React from 'React'
import { ThemePanel } from '@antv/s2-react-components'
import '@antv/s2-react-components/dist/s2-react-components.min.css'
const App = () => {
const s2Ref = React.useRef<SpreadSheet>();
const [themeCfg, setThemeCfg] = React.useState<ThemeCfg>({
name: 'default',
});
return (
<>
<ThemePanel
title="主题配置"
disableCustomPrimaryColorPicker={false}
defaultCollapsed={false}
onChange={(options, theme) => {
setThemeCfg({
name: options.themeType as ThemeName,
theme,
});
s2Ref.current?.setOptions({
hierarchyType: options.hierarchyType,
});
s2Ref.current?.render(false);
console.log('onChange:', options, theme);
}}
onReset={(options, prevOptions, theme) => {
console.log('onReset:', options, prevOptions, theme);
}}
/>
<SheetComponent
ref={s2Ref}
dataCfg={s2DataConfig}
options={s2Options}
sheetType="pivot"
themeCfg={themeCfg}
/>
</>
)
FAQs
React components for S2
The npm package @antv/s2-react-components receives a total of 40 weekly downloads. As such, @antv/s2-react-components popularity was classified as not popular.
We found that @antv/s2-react-components demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.