Skip to content

Commit

Permalink
update id to be optional string
Browse files Browse the repository at this point in the history
  • Loading branch information
lkzhao committed Mar 3, 2022
1 parent 3fd741e commit ff2c412
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ extension ViewComponent {
}
}

public func id(_ id: String) -> ViewIDComponent<Self> {
public func id(_ id: String?) -> ViewIDComponent<Self> {
ViewModifierComponent(content: self) {
$0.id(id)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ extension ViewRenderNode {
public func with<Value>(_ keyPath: ReferenceWritableKeyPath<View, Value>, _ value: Value) -> ViewKeyPathUpdateRenderNode<Value, Self> {
ViewKeyPathUpdateRenderNode(content: self, valueKeyPath: keyPath, value: value)
}
public func id(_ id: String) -> ViewIDRenderNode<Self> {
public func id(_ id: String?) -> ViewIDRenderNode<Self> {
ViewIDRenderNode(content: self, id: id)
}
public func animator(_ animator: Animator?) -> ViewAnimatorRenderNode<Self> {
Expand Down

0 comments on commit ff2c412

Please sign in to comment.