Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions src/docs/MultiplePageDemo/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ const { Content } = Layout;
const { TabPane } = Tabs;
const { Text } = Typography;

const initalReportProps = {
const initialReportProps = {
tokenType: 'Embed',
};

const ReportDemo = () => {
const [reportProps, setReportProps] = React.useState(
initalReportProps
initialReportProps
);
const [isVaildConfig, setIsValidConfig] = React.useState(false);
const [isValidConfig, setIsValidConfig] = React.useState(false);
const [activeTab, setActiveTab] = React.useState('form');

const onTabClick = (key, event) => setActiveTab(key);
Expand Down Expand Up @@ -76,7 +76,7 @@ const ReportDemo = () => {

const onReset = React.useCallback(() => {
setIsValidConfig(false);
}, [isVaildConfig]);
}, [isValidConfig]);

const extraSettings = {
filterPaneEnabled: false,
Expand Down Expand Up @@ -118,7 +118,7 @@ const ReportDemo = () => {
key="form"
>
<Form
initalReportProps={initalReportProps}
initialReportProps={initialReportProps}
onSubmit={renderWithReportProps}
onReset={onReset}
/>
Expand Down Expand Up @@ -151,9 +151,9 @@ const ReportDemo = () => {
</Info>
</TabPane>
<TabPane
disabled={!isVaildConfig}
disabled={!isValidConfig}
tab={
<Badge dot={isVaildConfig}>
<Badge dot={isValidConfig}>
<span>
<CheckCircleTwoTone twoToneColor="#52c41a" />
Report
Expand Down Expand Up @@ -212,7 +212,7 @@ const ReportDemo = () => {
</div>
</div>
<div style={{ display: 'flex', height: '100%' }}>
{isVaildConfig && (
{isValidConfig && (
<Report
style={{
height: '100%',
Expand All @@ -234,7 +234,7 @@ const ReportDemo = () => {
}}
/>
)}
{isVaildConfig && (
{isValidConfig && (
<Report
style={{
height: '100%',
Expand Down
20 changes: 9 additions & 11 deletions src/docs/Report/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import Form from './Form';
const { Content } = Layout;
const { TabPane } = Tabs;

const initalReportProps = {
const initialReportProps = {
tokenType: 'Embed',
};

const ReportDemo = () => {
const [reportProps, setReportProps] = React.useState(
initalReportProps
initialReportProps
);
const [isVaildConfig, setIsValidConfig] = React.useState(false);
const [isValidConfig, setIsValidConfig] = React.useState(false);
const [activeTab, setActiveTab] = React.useState('form');

const onTabClick = (key, event) => setActiveTab(key);
Expand All @@ -30,7 +30,7 @@ const ReportDemo = () => {

const onReset = React.useCallback(() => {
setIsValidConfig(false);
}, [isVaildConfig]);
}, [isValidConfig]);

const extraSettings = {
filterPaneEnabled: false,
Expand All @@ -50,15 +50,15 @@ const ReportDemo = () => {
key="form"
>
<Form
initalReportProps={initalReportProps}
initialReportProps={initialReportProps}
onSubmit={renderWithReportProps}
onReset={onReset}
/>
</TabPane>
<TabPane
disabled={!isVaildConfig}
disabled={!isValidConfig}
tab={
<Badge dot={isVaildConfig}>
<Badge dot={isValidConfig}>
<span>
<CheckCircleTwoTone twoToneColor="#52c41a" />
Report
Expand All @@ -67,17 +67,15 @@ const ReportDemo = () => {
}
key="report"
>
{isVaildConfig && (
{isValidConfig && (
<Report
style={{
height: '100%',
border: '0',
}}
{...reportProps}
extraSettings={extraSettings}
onLoad={(report) => {
console.log('Report Loaded!');
}}
onLoad={onLoadAndSetTokenListener}
onRender={(report) => {
console.log('Report Rendered');
}}
Expand Down