We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2afe6ba commit 9c16e39Copy full SHA for 9c16e39
Sources/SwiftHtml/Html/Tags/Input.swift
@@ -188,8 +188,10 @@ public extension Input {
188
}
189
190
/// Specifies a short hint that describes the expected value of an `<input>` element
191
- func placeholder(_ value: String) -> Self {
192
- node.upsert(Attribute(key: "placeholder", value: value))
+ func placeholder(_ value: String?) -> Self {
+ if let value = value {
193
+ node.upsert(Attribute(key: "placeholder", value: value))
194
+ }
195
return self
196
197
0 commit comments