-
Notifications
You must be signed in to change notification settings - Fork 26
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
Objects API prefill configuration copy button doesn't work #4859
Comments
9 tasks
sergei-maertens
added a commit
that referenced
this issue
Dec 11, 2024
It's obsolete now we're using react-select. The react-select component does accurately reflect the state of option selection, even if no value is selected while leaving the select blank is not allowed.
sergei-maertens
added a commit
that referenced
this issue
Dec 11, 2024
sergei-maertens
added a commit
that referenced
this issue
Dec 11, 2024
Handling the reset of dependent fields in the ObjectTypeSelect component is too naive - there's no guarantee that the fields must always be reset, for example with the copy-config-from-registration button. Clicking that button updates a bunch of form state at once, and it already manages the dependent fields. So, providing a callback to handle the reset allows us to handle the dependent fields still, while having to option to incorporate extra context.
sergei-maertens
added a commit
that referenced
this issue
Dec 11, 2024
The toggle is not displayed if there are no backends to copy from, so the UI can be de-cluttered. Additionally, the mechanism/slot for the extra controls has been refactored to be more generic - anything can now be rendered there that may be relevant, and the state is specific to the UI being rendered so that has been removed from the generic parent component. We use the formik status to track form-specific state, through a small hook that normalizes the shape of the status (since it can be anything).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Product versie / Product version
latest
Customer reference
No response
Omschrijf het probleem / Describe the bug
The copy button in the Objects API prefill form doesn't work if the API group is changed by the copy action.
If this is my registration config:
And I add a new user defined variable and configure prefill:
![60cQUGu0GA](https://private-user-images.githubusercontent.com/29249171/390000763-f344c29b-ff47-4ae5-ad42-25d9180392b6.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1OTY4NzEsIm5iZiI6MTczOTU5NjU3MSwicGF0aCI6Ii8yOTI0OTE3MS8zOTAwMDA3NjMtZjM0NGMyOWItZmY0Ny00YWU1LWFkNDItMjVkOTE4MDM5MmI2LmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDA1MTYxMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTM1ZDUxNjBmNGY4N2NlNWM2YWJlMjkyOWJhYWQ2MzdhNzViM2E1NmE4MjE3NTQxMWY0ZjliNTJiNWJkNmZmOWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.ntuNzue02iyCj0r0QYpT7qAz543052yQtyChvK2C0mE)
Only the API group is set correctly, and the rest of the values are the defaults, not the correct values. This is due to the fact that the copy button sets the API group, which triggers a reset of the other fields after setting them. Currently the copy button only works if the API group remains the same
Stappen om te reproduceren / Steps to reproduce
Verwacht gedrag / Expected behavior
Setting the api group should not reset the other values after copying
Screen resolution
None
Device
None
OS
None
Browser
No response
The text was updated successfully, but these errors were encountered: