Skip to content

Commit 383be4f

Browse files
committed
Fix text field not always adjusting size for error label
The first time the error was shown on some text fields, the field didn't adjust its height to fit the error text.
1 parent 448d787 commit 383be4f

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

MaterialTextField/MFTextField.m

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,7 @@ - (void)setupErrorConstraints
148148
{
149149
self.errorLabelTopConstraint = [self.errorLabel.topAnchor constraintEqualToAnchor:self.topAnchor
150150
constant:[self topPaddingForErrorLabelHidden:!self.hasError]];
151-
NSLayoutConstraint *bottom = [self.errorLabel.bottomAnchor constraintGreaterThanOrEqualToAnchor:self.bottomAnchor];
152-
bottom.priority = 900;
153-
151+
NSLayoutConstraint *bottom = [self.errorLabel.bottomAnchor constraintEqualToAnchor:self.bottomAnchor];
154152
NSLayoutConstraint *leading = [self.errorLabel.leadingAnchor constraintEqualToAnchor:self.leadingAnchor
155153
constant:self.errorPadding.width];
156154
NSLayoutConstraint *trailing = [self.trailingAnchor constraintGreaterThanOrEqualToAnchor:self.errorLabel.trailingAnchor

0 commit comments

Comments
 (0)