ux
ux copied to clipboard
[LiveComponents] Fix 1384
Q | A |
---|---|
Bug fix? | yes |
New feature? | no |
Issues | Fix #1384 |
License | MIT |
Hi @WebMamba, thanks for your response, and I have also looked into the custom hydration function. However, the issue arises from using the built-in LiveCollectionType and LiveCollectionTrait.
As soon as the built-in Add function it used, it create a index => null record in the existing collection. Would be odd to expect everyone to create a custom hydration function when using LiveCollectionType. My opinion is that this should be a basic functionality of the package or needs documented.
We could also choose to add more logic in the LiveCollectionTrait; function addCollectionItem() to create an instance here instead of adding empty value.
We could also choose to add more logic in the LiveCollectionTrait; function addCollectionItem() to create an instance here instead of adding empty value.
It sounds like a better way to go IMHO
Ping! This PR in its current state, I think, is not the correct solution. But we have 2 proposed alternatives:
We could also choose to add more logic in the LiveCollectionTrait; function addCollectionItem() to create an instance here instead of adding empty value.
And
https://github.com/symfony/ux/pull/1385#discussion_r1455917789
What's the best path?