Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize References Loaders Display #5668

Merged
merged 4 commits into from
Dec 18, 2020

Conversation

djhi
Copy link
Collaborator

@djhi djhi commented Dec 14, 2020

When displaying a lot of references fields/inputs, for example in a List, having a lot of loaders can harm performances, especially on low-end devices. This PR applies the same optimization as for the skeletons: don't display loaders until at least a second has passed

@djhi djhi added the RFR Ready For Review label Dec 14, 2020
@djhi djhi added this to the 3.11.1 milestone Dec 14, 2020
@@ -16,6 +15,7 @@ import {
import { fieldPropTypes, PublicFieldProps, InjectedFieldProps } from './types';
import { ClassesOverride } from '../types';
import sanitizeFieldRestProps from './sanitizeFieldRestProps';
import { LinearProgress } from '../layout';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useless change

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, we are now using our own LinearProgress instead of MUI

packages/ra-ui-materialui/src/field/ReferenceField.tsx Outdated Show resolved Hide resolved
packages/ra-ui-materialui/src/input/ReferenceInput.tsx Outdated Show resolved Hide resolved
@fzaninotto fzaninotto merged commit 352ef61 into master Dec 18, 2020
@fzaninotto fzaninotto deleted the optimize-references-loaders-display branch December 18, 2020 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants