Skip to content

Commit

Permalink
Avoid delay in LinearProgress display (when adding layer to a group)
Browse files Browse the repository at this point in the history
  • Loading branch information
mabhub committed Nov 17, 2023
1 parent bdf6fe2 commit d4a4bc3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/modules/RA/Scene/components/GeolayerSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { LinearProgress, withDataProvider, GET_LIST } from 'react-admin';
import debounce from 'lodash.debounce';
import uniqBy from 'lodash.uniqby';

import Box from '@material-ui/core/Box';
import FormControl from '@material-ui/core/FormControl';
import InputLabel from '@material-ui/core/InputLabel';
import MenuItem from '@material-ui/core/MenuItem';
Expand Down Expand Up @@ -120,7 +121,11 @@ const GeolayerSelect = ({ dataProvider, onChange, excludeIds = [], includeIds =
* Display progress bar until we have geolayers
*/
if (!geolayers) {
return <LinearProgress />;
return (
<Box>
<LinearProgress timeout={0} style={{ marginTop: 30, marginBottom: 30 }} />
</Box>
);
}

if (!geolayers.length) {
Expand Down

0 comments on commit d4a4bc3

Please sign in to comment.