q-shift / backstage-plugins

Apache License 2.0
3 stars 7 forks source link

Extensions selected are gone when we return back to the template screen of the QuarkusExtensionList #92

Closed cmoulliard closed 7 months ago

cmoulliard commented 7 months ago

Issue

Extensions selected are gone when we return back to the template screen of the QuarkusExtensionList or we only got the first value selected

cmoulliard commented 7 months ago

This is what we observe when we play a scenario where no filters are defined for "ui:field: QuarkusExtensionList"

Steps FormData Value
1st access* empty "io.quarkus:quarkus-agroal"
Next/Back "io.quarkus:quarkus-agroal" "io.quarkus:quarkus-agroal"
Select REST "io.quarkus:quarkus-agroal" "io.quarkus:quarkus-agroal" and "io.quarkus:quarkus-rest"

*: The browser console reports this message when we arrive in the screen Material-UI: The value provided to useAutocomplete is invalid. None of the options match with{"id":"io.quarkus:quarkus-agroal","name":"Agroal - Database connection pool"}. You can use thegetOptionSelectedprop to customize the equality test.

If the extensions field is empty when we open the screen the first time, then we observe

Steps FormData Value
1st access* empty empty
Select REST "io.quarkus:quarkus-rest"
Next/Back "io.quarkus:quarkus-rest" "io.quarkus:quarkus-agroal"

Remark: What FormData stores is only the name of the extension and not the QuarkusExtension object: id + extension.

We have 3 issues as reported: