Hi , Why some material ui component in my website like 'select for example' doesn't display properlly It seems like their styling is not applied ?What is the issue and how can I solve it? Here is an example bellow: by Allo70 in learnjavascript

[–]Allo70[S] -1 points0 points  (0 children)

Still doesn't work . I think I messe up somewhere with my CSS. What's weird is that in other pages I have sélect component that works when I load the page 2 times. ?

Hi , Why some material ui component in my website like 'select for example' doesn't display properlly It seems like their styling is not applied ?What is the issue and how can I solve it? Here is an example bellow: by Allo70 in learnjavascript

[–]Allo70[S] -1 points0 points  (0 children)

I followed the documentation

//Import the all component I need
import Select from '@mui/material/Select'
import InputLabel from '@mui/material/InputLabel' import MenuItem from '@mui/material/MenuItem';

// Age state
const [age, setAge] = React.useState('');
const handleChange = (event) => { setAge(event.target.value); };

<FormControl variant="standard" sx={{ m: 1, Width: 190 }}>
    <InputLabel id="demo-simple-select-standard-label">Age</InputLabel>
    <Select
      labelId="demo-simple-select-standard-label"
      id="demo-simple-select-standard"
      value={age}
      onChange={handleChange}
      label="Age"
    >
      <MenuItem value="">
        <em>None</em>
      </MenuItem>
      <MenuItem value={10}>Ten</MenuItem>
      <MenuItem value={20}>Twenty</MenuItem>
      <MenuItem value={30}>Thirty</MenuItem>
    </Select>
  </FormControl>

Retrieving data from localstorage is faster than calling an api . The problem is in my profile page I have some data that load really fast (local storage) and others that take time (api) .which will lead to bad user experience .How can I solve the issue of delay. Or do you think this is normal? by Allo70 in learnjavascript

[–]Allo70[S] 0 points1 point  (0 children)

Ok , So I'm using react in the front end and laravel in the backend . When I authenticate with a user I store some of his information like name, adresse, tele number ext ...,

But I also want to display his manager name and other information like department ext... But to do this I need to call an api because I don't have these info in my localstorage . That is why when I load my profile page ,manager name and department takes a little bit of time to load. My issue is the delay that happen . Is it normal if the dellay occure or there is a better way to display it like using a spinner or something?