Access element in ObjectElement with dot syntax #231
-
Hello, I'm pretty new to this library and I read a lot of a doc to get answers by myself but I'm stuck with this one.
Each ObjectElement contains a button to save the appropriate section, all data are stored in a Pinia store. According to the doc, I subscribed to the "saveTeam" button using this syntax : But when I tried to do this : What I am missing here ? Thanks for your help, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You cannot have <Vueform
ref="form$"
v-model="data"
class="register-form"
sync
>
<ObjectElement
name="team"
:schema="teamSchema"
/>
<ListElement
name="members"
:object="memberSchema"
/>
</Vueform> Than, you can use |
Beta Was this translation helpful? Give feedback.
-
Thank for the tip ! Works like a charm. |
Beta Was this translation helpful? Give feedback.
You cannot have
.
in an element name. If you're looking to add multiple team members, it's recommended to useListElement
instead:Than, you can use
form$.value.el$('members.0.saveMember')
.