From 143fe28d39e1bc9a93c0100910c48605013e816f Mon Sep 17 00:00:00 2001 From: Maya Date: Tue, 10 Nov 2020 21:49:46 +0300 Subject: [PATCH] Fixes --- .../advanced-configuration-form.tsx | 10 ++++------ .../create-task-page/create-task-content.tsx | 13 ++++++------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/cvat-ui/src/components/create-task-page/advanced-configuration-form.tsx b/cvat-ui/src/components/create-task-page/advanced-configuration-form.tsx index 08883100..fc12853e 100644 --- a/cvat-ui/src/components/create-task-page/advanced-configuration-form.tsx +++ b/cvat-ui/src/components/create-task-page/advanced-configuration-form.tsx @@ -26,14 +26,13 @@ export interface AdvancedConfiguration { useZipChunks: boolean; dataChunkSize?: number; useCache: boolean; - activeTab: string; copyData?: boolean; } type Props = FormComponentProps & { onSubmit(values: AdvancedConfiguration): void; installedGit: boolean; - activeTab: string; + activeFileManagerTab: string; }; function isPositiveInteger(_: any, value: any, callback: any): void { @@ -81,7 +80,7 @@ function isIntegerRange(min: number, max: number, _: any, value: any, callback: class AdvancedConfigurationForm extends React.PureComponent { public submit(): Promise { return new Promise((resolve, reject) => { - const { form, onSubmit, activeTab } = this.props; + const { form, onSubmit } = this.props; form.validateFields((error, values): void => { if (!error) { @@ -103,7 +102,6 @@ class AdvancedConfigurationForm extends React.PureComponent { onSubmit({ ...values, frameFilter: values.frameStep ? `step=${values.frameStep}` : undefined, - activeTab: activeTab, }); resolve(); } else { @@ -410,11 +408,11 @@ class AdvancedConfigurationForm extends React.PureComponent { } public render(): JSX.Element { - const { installedGit, activeTab } = this.props; + const { installedGit, activeFileManagerTab } = this.props; return (
- {activeTab === 'share' ? this.renderCopyDataChechbox() : null} + {activeFileManagerTab === 'share' ? this.renderCopyDataChechbox() : null} {this.renderUzeZipChunks()} diff --git a/cvat-ui/src/components/create-task-page/create-task-content.tsx b/cvat-ui/src/components/create-task-page/create-task-content.tsx index c8964256..c9870e45 100644 --- a/cvat-ui/src/components/create-task-page/create-task-content.tsx +++ b/cvat-ui/src/components/create-task-page/create-task-content.tsx @@ -23,6 +23,7 @@ export interface CreateTaskData { advanced: AdvancedConfiguration; labels: any[]; files: Files; + activeFileManagerTab: string; } interface Props { @@ -42,7 +43,6 @@ const defaultState = { lfs: false, useZipChunks: true, useCache: true, - activeTab: 'local', }, labels: [], files: { @@ -50,6 +50,7 @@ const defaultState = { share: [], remote: [], }, + activeFileManagerTab: 'local', }; class CreateTaskContent extends React.PureComponent { @@ -116,12 +117,10 @@ class CreateTaskContent extends React.PureComponent { - const values = this.state.advanced; + const values = this.state; this.setState({ - advanced: { - ...values, - activeTab: key - } + ...values, + activeFileManagerTab: key }); }; @@ -221,7 +220,7 @@ class CreateTaskContent extends React.PureComponentAdvanced configuration}> { this.advancedConfigurationComponent = component; }}