Repository navigation
Conversation
There was a problem hiding this comment.
Thanks for adding this, I just saw a couple of issues and had a couple of suggestions.
Also, could you do one more change to support decimals in the sizing of the attached input by changing that line to:
const maxWidthStyle = { maxWidth: `${Math.max(String(min + step).length, String(max + step).length) + 2}em` };
| {this.renderLabel('max')} | ||
| {extraInputNode} | ||
| </div> | ||
| {this.renderErrorMessage()} |
There was a problem hiding this comment.
I think we should leave out rendering the error message in the DOM because this should technically be handled by a EuiFormRow that hooks up the message to the input. Currently this error message does not get read by a screen reader as it is.
Maybe it should just pass back an error message then the consumer can hook it into the error prop of EuiFormRow?
There was a problem hiding this comment.
Ok. I will add a onValidationError callback that receives the error message
|
@cchaos I am not sure I like having separate callbacks |
|
I think that's fine. That'll also help with localization. |
|
closing. EuRange refactor has made these changes obsolete |
fixes #1458
Adds prop
onValidatedChangetoEuiRange.onValidatedChangeis only called when value changes to a Number that is within the provided min and max (inclusive).