feat: improves ui performance with thousands of fields

* chore: progress to ui-performance

* chore: removes block load testing
This commit is contained in:
James Mikrut
2023-03-06 16:46:07 -05:00
committed by GitHub
parent ada9a89cd2
commit 0779f8d73d
3 changed files with 2 additions and 3 deletions

View File

@@ -321,7 +321,6 @@ const ArrayFieldType: React.FC<Props> = (props) => {
/>
<RenderFields
className={`${baseClass}__fields`}
forceRender
readOnly={readOnly}
fieldTypes={fieldTypes}
permissions={permissions?.fields}

View File

@@ -197,6 +197,7 @@ const BlocksField: React.FC<Props> = (props) => {
useEffect(() => {
const initializeRowState = async () => {
const data = formContext.getDataByPath<Row[]>(path);
const preferences = (await getPreference(preferencesKey)) || { fields: {} };
dispatchRows({ type: 'SET_ALL', data: data || [], collapsedState: preferences?.fields?.[path]?.collapsed, initCollapsed });
};
@@ -332,7 +333,6 @@ const BlocksField: React.FC<Props> = (props) => {
/>
<RenderFields
className={`${baseClass}__fields`}
forceRender
readOnly={readOnly}
fieldTypes={fieldTypes}
permissions={permissions?.fields}

View File

@@ -27,7 +27,7 @@ const expressApp = express();
const startDev = async () => {
await payload.init({
secret: uuid(),
mongoURL: process.env.MONGO_URL || 'mongodb://localhost/payload',
mongoURL: process.env.MONGO_URL || 'mongodb://127.0.0.1/payload',
express: expressApp,
email: {
logMockCredentials: true,