-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Binding Arrays - Cannot read properties of undefined (reading '0') #2949
Comments
I am also facing this problem . There is a problem with array initilization . My expectation was Model.createEmptyValue on a parent object with an array will initialize it . But it’s not happening |
@platosha . This looks like basic feature that should work out of the box. Do you see any problems in the way it got implemented ? |
Thanks for reporting. The implementation in the project looks fine from the first glance. I'll try to reproduce and get back with more info. |
Small clarification by the way, |
There is a bug in the form library around on demand initialization of nullable arrays. I'm working on a fix. Meanwhile, as a workaround, try using @NonNullApi
package com.example.application;
import org.springframework.lang.NonNullApi; |
* fix(form): initialize arrays when receiving items Fixes #2949 * fix(lit-form): make it build * test(lit-form): make linter happy --------- Co-authored-by: Vlad Rindevich <vladrin@vaadin.com>
* fix(form): initialize arrays when receiving items Fixes #2949 * fix(lit-form): make it build * test(lit-form): make linter happy --------- Co-authored-by: Vlad Rindevich <vladrin@vaadin.com>
* fix(form): initialize arrays when receiving items Fixes #2949 * fix(lit-form): make it build * test(lit-form): make linter happy --------- Co-authored-by: Vlad Rindevich <vladrin@vaadin.com>
…3126) fix(form): initialize arrays when receiving items (#2959) * fix(form): initialize arrays when receiving items Fixes #2949 * fix(lit-form): make it build * test(lit-form): make linter happy --------- Co-authored-by: Anton Platonov <platosha@gmail.com> Co-authored-by: Vlad Rindevich <vladrin@vaadin.com> Co-authored-by: Luciano Vernaschi <luciano@vaadin.com>
Describe the bug
Following the documentation https://vaadin.com/docs/latest/hilla/guides/forms/binding-arrays is giving the error while trying to bind items
Expected-behavior
No error is expected while adding person
Reproduction
https://github.com/shinusuresh/hilla-form-binding-array-issue.git
System Info
Operating System: MacOS
Hilla Version: 24.5.7
Browser Type: Chrome
The text was updated successfully, but these errors were encountered: