You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a project that uses van-field and bundles as a separate js file.
When I put my bundled component in van-form, it can't inherit the labelWidth/labelAlign and other props. Since the FORM_KEY (a symbol) is bundled and it's not the same value as the one used in van-form.
My current workaround is to patch the package and change the value of FORM_KEY from Symbol('van-form') to Symbol.for('van-form').
Possible solutions:
Use Symbol.for like I already did
Allow pass form to van-field (Personlly preferred)
Allow pass the FORM_KEY
What does the proposed API look like?
If we choose option 1. The components don't need do any changes.
What problem does this feature solve?
I'm working on a project that uses
van-field
and bundles as a separate js file.When I put my bundled component in
van-form
, it can't inherit thelabelWidth
/labelAlign
and other props. Since theFORM_KEY
(a symbol) is bundled and it's not the same value as the one used invan-form
.My current workaround is to patch the package and change the value of
FORM_KEY
fromSymbol('van-form')
toSymbol.for('van-form')
.Possible solutions:
Symbol.for
like I already didform
tovan-field
(Personlly preferred)FORM_KEY
What does the proposed API look like?
If we choose option 1. The components don't need do any changes.
If we choose option 2. It will be used like
If we choose option 3. It will be used like
The text was updated successfully, but these errors were encountered: