[Live Component] Data Model Updates for Live Component Form with Nested Entities #2776
Unanswered
Precipitator80
asked this question in
Questions & Answers
Replies: 1 comment
-
I believe this may be a related issue #2290 . |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a Live Component with the
ComponentWithFormTrait
. In this component I have an entity with a LiveCollection of other entities, say aBlogPost
entity withUserComment
s. If I want to run code linked toBlogPost
title changes, I can usedata-model
on the form type in conjunction with keyswritable: ['title']
andonUpdated: ['title' => 'processTitle']
in the Live Component code. However, I cannot do this with, for example, the body of aUserComment
. This is due to the data being too complex to bind. Is there a good way of working around this issue so that I can trigger Live Component PHP code whenUserComment
fields change?Beta Was this translation helpful? Give feedback.
All reactions