-
Notifications
You must be signed in to change notification settings - Fork 841
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[EuiFormRow] Add isDisabled
prop
#4899
Comments
Yeah, there's a lot of problems with the way EuiFormRow works right now without any real connection between it and the form input. The idea is to update the form input control components themselves to accept In the short term, I'd say that EuiFormRow should just accept a general |
isLabelDisabled
propisDisabled
prop
I would be happy to work on this issue. I just want to make sure I understand the intended behavior for the prop before I dive in. Basically, when the prop is |
We still want to render the input, but add the |
To elaborate the issue, here is a codepen of the above code with each variation. I love the UX of labels focusing their inputs, but it doesn't make sense to any scenario other than enabled. The existing PR was correct in that disabled form row's should disable their inputs (this is not my goal but is definitely relevant and is not a breaking change as disabled doesnt currently exist for form row) but it should also make the label appear like regular text. And just to clarify & backtrack on my statement in the issue
The |
This maybe a little outside your intended use-case or design, but I use
EuiFormRow
like so:Currently, the label is clickable in all circumstances. However, the label should only be clickable when
EuiSelect
is rendered, i.e. when there's an input to actually focus on. As EUI cannot easily determine if the child is selectable, it'd make sense to add the propisLabelDisabled
. If the label is disabled then it'd just render a normalEuiFormLabel
, with nofor
attribute.I have swapped to using
EuiFormLabel
a rendering aEuiFormRow
only for the success state, but then I end up with poor spacing so have to also conditionally render anEuiSpacer
.The text was updated successfully, but these errors were encountered: