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

Autoform render field of type Map<String, Integer> cannot enable the submit button #2692

Open
antoniusng opened this issue Sep 2, 2024 · 2 comments
Labels
bug Something isn't working hilla Issues related to Hilla waiting for author

Comments

@antoniusng
Copy link

Describe the bug

I have the following model:
public record PackageRecord( String id, Long version, String name, Map<String, Integer> features ) { }

This is how I render the input fields for features:
image

This is how it looks like on the browser:
image

The problem is: when I change the value of the input, I am not able to enable the submit button. Am I doing this correctly? What is the proper way to render text fields for Map?

Expected-behavior

No response

Reproduction

image

System Info

OS: Mac OS Sonoma 14.6.1
Hilla: 24.4.6
Browser: Firefox 129.0.2 (64bit)

@antoniusng antoniusng added bug Something isn't working hilla Issues related to Hilla labels Sep 2, 2024
@platosha
Copy link
Contributor

platosha commented Sep 3, 2024

From the looks of it, seems that the issue is that any changes from the user aren't updating the form binder. The item value is mutated, but this change is not being picked up.

Please try using field with the form binder API to get proper two-way bindings.

@antoniusng
Copy link
Author

Thank you @platosha. That makes sense.

Any pointers on how I can make use of field to get the bindings?

I am not yet able to find a way to do that.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hilla Issues related to Hilla waiting for author
Projects
None yet
Development

No branches or pull requests

2 participants