Stop reseting data when method switching

[MAILPOET-1808]
This commit is contained in:
Pavel Dohnal
2019-04-17 10:30:17 +02:00
committed by M. Shull
parent dd41d46888
commit 152775a81a

View File

@@ -28,11 +28,6 @@ function StepMethodSelection({
const [method, setMethod] = useState(undefined); const [method, setMethod] = useState(undefined);
const [csvData, setCsvData] = useState(''); const [csvData, setCsvData] = useState('');
const methodChanged = (newMethod) => {
setMethod(newMethod);
setCsvData('');
};
const finish = (parsedData) => { const finish = (parsedData) => {
window.importData.step_method_selection = parsedData; window.importData.step_method_selection = parsedData;
navigate( navigate(
@@ -55,7 +50,7 @@ function StepMethodSelection({
<> <>
<SelectMethod <SelectMethod
activeMethod={method} activeMethod={method}
onMethodChange={methodChanged} onMethodChange={setMethod}
/> />
{ method === 'paste-method' { method === 'paste-method'
? ( ? (