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

Dynamic value of the readOnly field for FormGroup children #3358

Open
pPrecel opened this issue Sep 24, 2024 · 0 comments
Open

Dynamic value of the readOnly field for FormGroup children #3358

pPrecel opened this issue Sep 24, 2024 · 0 comments

Comments

@pPrecel
Copy link
Contributor

pPrecel commented Sep 24, 2024

Description

It's not possible to make fields not operational dynamically. Right now we achieve that using the visibility field but we prefer to inform users that if the enabled field is false then other fields are still there but are not operational.

It would be nice to have a feature allowing developers to disable a form field but not hide it. In this case when the field is disabled (for example) turnes gray, the value can't be changed, bu it's still displaying the latest value.

Reasons

In our case we want to allow users to edit fields gateway and host only when the enabled field is true. In other cases values for these fields should be displayed but not possible to edit/change them.

Our module allows both configurations:

spec:
  externalAccess:
    enabled: true
    gateway: kyma-system/fs-super-gateway
    host: super-registry.fb7b356.stage.kyma.ondemand.com

and

spec:
  externalAccess:
    enabled: false
    gateway: kyma-system/fs-super-gateway
    host: super-registry.fb7b356.stage.kyma.ondemand.com

so we should not hide the gateway and the host in the form view when the enabled field is false

Attachments

Our solution is described here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant