-
Notifications
You must be signed in to change notification settings - Fork 43
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
feat(form): allow composition #297
Comments
Should we map the const form = new FormGroup([
{
name: 'username',
label: 'Username',
},
{
name: 'password',
label: 'Password',
type: 'password',
}
]
---
<Form formGroups={form}>
<TextInput name="username" />
<TextInput name="password" />
</Form> We add a attribute |
Yes exactly. What I am unsure of right now is if we still need the control components or can we just use HTML elements directly <Form formGroups={formgrp}>
<input name="username" />
<input name="password" />
</Form> |
I'm not quite sure how to access the components in slots. Looking on this. It said:
so, I think it can't be possible to access the components in slots which we passed from the parent components. Any idea? @ayoayco @fazzaamiarso |
@Icyscools if I'm right, you can access child nodes with |
Not sure if we can access that via server-side. But it's worth to try. Thanks! @fazzaamiarso |
Currently, we only expose the
Form
component and all the control components are rendered and ordered according to the configuration.We should next allow users of the library to compose the form as they want.
It should look something like
The text was updated successfully, but these errors were encountered: