- updated univerjs import;
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import React from 'react';
|
||||
import React, { Suspense } from 'react';
|
||||
import { isNil } from 'ramda';
|
||||
import { classNames } from 'primereact/utils';
|
||||
|
||||
@@ -19,7 +19,7 @@ import Table from './components/Table';
|
||||
import PasswordField from './components/PasswordField';
|
||||
import CriteriaTable from './components/CriteriaTable';
|
||||
import FileSelect from './components/FileSelect';
|
||||
import Spreadsheet from './components/Spreadsheet';
|
||||
const Spreadsheet = React.lazy(() => import('./components/Spreadsheet'));
|
||||
|
||||
const FormField = (props) => {
|
||||
const fields = {
|
||||
@@ -45,7 +45,9 @@ const FormField = (props) => {
|
||||
|
||||
return (!isNil(Comp)
|
||||
? <div className={classNames(['appForm__field', props.type, props.additionalClass])}>
|
||||
<Comp {...props} />
|
||||
<Suspense fallback={null}>
|
||||
<Comp {...props} />
|
||||
</Suspense>
|
||||
</div>
|
||||
: null
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user