-
Notifications
You must be signed in to change notification settings - Fork 21
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
Conditional attributes #134
Comments
You can use instead: Input()
.modify(if: true) {
$0.checked()
} But I like your idea. I like the fact, that it's a one-liner. Let me check, if we had it in the past and I removed it for any reason. One good thing about What do you think? |
Sure, that works for me for the time being :) There are a few ergonomics changes I'd like to propose once I've used it a bit more in anger - I'll raise separate issues. |
Sure, let them come. I appreciate it. :-) |
For alpha.6 I have added a condition option for
There are more, but I think it makes no sense to add it for them:
I went through them, thinking about it from a user standpoint and what could be a possibly an option flag in the user settings. |
In HTML, there are attributes that we'd only want to add on some condition, such as "checked" and "disabled". This is currently quite verbose to do, involving something like:
It would be really helpful if there were support for something like:
The text was updated successfully, but these errors were encountered: