Skip to content

Commit 3e5f06c

Browse files
resolve todo
1 parent dd421c7 commit 3e5f06c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/ComponentsKit/TextInput/Models/TextInputVM.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,9 @@ extension TextInputVM {
149149
}
150150

151151
private func height(forRows rows: Int) -> CGFloat {
152-
// TODO: [2] Show a warning if number of rows less than 1
152+
if rows < 1 {
153+
assertionFailure("Number of rows in TextInput must be greater than or equal to 1")
154+
}
153155
let numberOfRows = max(1, rows)
154156
return self.preferredFont.uiFont.lineHeight * CGFloat(numberOfRows) + 2 * self.contentPadding
155157
}

0 commit comments

Comments
 (0)