Skip to content

Commit

Permalink
feat(field): Add field name to field wrapper
Browse files Browse the repository at this point in the history
Currently, there's no easy mechanism to target specific
fields from the form.

This commit adds a new `data-fieldname` attribute to the
field wrapper, making easier to target specific fields.

With this change, we can override the position of the field
from the consumer side.
  • Loading branch information
lordrip committed Oct 21, 2023
1 parent 511ea96 commit 0f00ed2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/wrapField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export default function wrapField(
return (
<FormGroup
data-testid={'wrapper-field'}
data-fieldname={props.name}
fieldId={id}
label={label}
isRequired={required}
Expand Down

0 comments on commit 0f00ed2

Please sign in to comment.