Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAllow 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. |
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
./.