-
Notifications
You must be signed in to change notification settings - Fork 532
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
Disabling specific radio options #551
Comments
@Anoesj does PR #556 fulfill this request? I've implemented it to support boolean values for "item.disabled" as well as a function that is passed a reference to the model, so you can perform some business logic based on other values. For example:
|
@zoul0813 Absolutely, great work! I was hoping this would arrive in v3, but this is even better :-) |
@zoul0813 One minor improvement would be adding a class "is-disabled" to labels belonging to disabled radio inputs. This allows for easy radio styling. For example, right now, we can't put opacity: 0.4 on the label text when the radio input is disabled. |
Sounds like a good request - I’ll see what I can do, PR’s welcome. I’d suggest using a more generic class like “disabled” ... |
I'll see if I can make some time to work on this, little bit busy though. I would still go for "is-disabled" since "is-checked" is already being used. |
#551 - added "is-disabled" class to the radios label
I'm submitting a feature request.
I ran into some behavior I didn't expect in radios fields. It seems logical that setting
disabled: true
on a single option would result indisabled="disabled"
on that particular option. However, options are only disabled when the whole radios field is disabled. I looked at fieldRadios.vue and to me it seems like the most simple solution would be to change this:into this:
This makes sure that a radio option is disabled whenever its parent is disabled entirely and whenever that particular option is disabled itself.
Example (expected behavior after option label):
https://jsfiddle.net/Anoesj/qd8fv430/
Version: 2.3.2
The text was updated successfully, but these errors were encountered: