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 need some custom attributes. data-test-id or id or name for e2e tests, and autocomplete to let browsers properly fill out login/signup forms.
I've been using Form.View.custom so far, with CustomConfig and it works out for styling (bootstrap in my case). However, TextFieldConfig etc have only label and placeholder hardcoded into their attributes.
I am kind of lost here. Did I completely miss something?
Is this simply not possible without a PR?
Or should I start by copypasting the whole of Form.View.custom and everything "under it"?
The text was updated successfully, but these errors were encountered:
I'm in the same boat. I'd like to attach data tags and other attributes to the fields that would effect how they are rendered. As @bgrosse-midokura mentioned, TextFieldConfig.attributes looks a good place to list them but it's type is set to TextField.Attributes, and I don't see how that could be extended.
Updated
In the meantime I found an issue #32 in which @hecrj talk about this. If I understood correctly, the way to go is to define custom fields, i.e. reimplement Form and Form.View. It seems quite a big work though because that means reimplementing all the fields if you only want to have custom attributes.
I need some custom attributes.
data-test-id
orid
orname
for e2e tests, andautocomplete
to let browsers properly fill out login/signup forms.I've been using
Form.View.custom
so far, withCustomConfig
and it works out for styling (bootstrap in my case). However,TextFieldConfig
etc have onlylabel
andplaceholder
hardcoded into their attributes.I am kind of lost here. Did I completely miss something?
Is this simply not possible without a PR?
Or should I start by copypasting the whole of
Form.View.custom
and everything "under it"?The text was updated successfully, but these errors were encountered: