q-shift / backstage-plugins

Apache License 2.0
3 stars 7 forks source link

Implement a popup list showing the quarkus versions returned by /api/streams #56

Closed cmoulliard closed 8 months ago

cmoulliard commented 8 months ago

TODO: If the user returns back to the screen where they selected the value, then the default value is displayed instead of the previously selected :-(

cmoulliard commented 8 months ago

I did a change to the code (commit - 9cdb761) to introduce a selectedVersion which is used as defaultValue instead of defaultQuarkusVersion. Unfortunately we got this error when a user select a different value from the list:

useControlled.js:31 Material-UI: A component is changing the default value state of an uncontrolled Autocomplete after being initialized. To suppress this warning opt to use a controlled Autocomplete. 
    at Autocomplete (webpack-internal:///../../node_modules/@material-ui/lab/esm/Autocomplete/Autocomplete.js:301:35)
    at WithStyles (webpack-internal:///../../node_modules/@material-ui/styles/esm/withStyles/withStyles.js:65:31)
    at div
    at FormControl (webpack-internal:///../../node_modules/@material-ui/core/esm/FormControl/FormControl.js:85:24)
    at WithStyles (webpack-internal:///../../node_modules/@material-ui/styles/esm/withStyles/withStyles.js:65:31)
    at QuarkusVersionList (webpack-internal:///../../node_modules/@qshift/plugin-quarkus/dist/index.esm.js:45:5)
    at eval (webpack-internal:///../../node_modules/@backstage/plugin-scaffolder-react/dist/alpha.esm.js:664:47)
    at div
    at FormControl (webpack-internal:///../../node_modules/@material-ui/core/esm/FormControl/FormControl.js:85:24)