Allow specification of id prop on ErrorMessage #2427
Comments
|
Let's say we have
So giving ErrorMessage an id prop will work for 1 out of 3 scenarios. |
|
I will try to implement this. |
|
The id passed to ErrorMessage need to be rendered inside the element in children |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Current Behavior
The type
ErrorMessagedoesn't have an id property.Desired Behavior
It'd be nice
id?: stringwould be added to the typeErrorMessageand set on the outermost component that serves as error message.Suggested Solution
Add
id={this.props.id}to the outer component inErrorMessage.Who does this impact? Who is this for?
This improves handling of error messages in e2e tests. It doesn't impact users in any way as the prop can still be omitted.
Describe alternatives you've considered
Wrapping
ErrorMessagein adivwhich has the sole purpose of providing the id which is not nice.Additional context
./.
The text was updated successfully, but these errors were encountered: