Skip to content

Commit

Permalink
* [ios] fix input disabled attribute bug
Browse files Browse the repository at this point in the history
  • Loading branch information
acton393 committed Aug 24, 2016
1 parent 63320cf commit fd2c526
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ios/sdk/WeexSDK/Sources/Component/WXTextInputComponent.m
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ - (instancetype)initWithRef:(NSString *)ref type:(NSString *)type styles:(NSDict
[self setAutofocus:[attributes[@"autofocus"] boolValue]];
}
if (attributes[@"disabled"]) {
[_inputView setEnabled:[attributes[@"disabled"] boolValue]];
[_inputView setEnabled:![attributes[@"disabled"] boolValue]];
}
if (attributes[@"placeholder"]) {
_placeholder = attributes[@"placeholder"];
Expand Down Expand Up @@ -238,7 +238,7 @@ - (void)updateAttributes:(NSDictionary *)attributes
[self setAutofocus:[attributes[@"autofocus"] boolValue]];
}
if (attributes[@"disabled"]) {
[_inputView setEnabled:[attributes[@"disabled"] boolValue]];
[_inputView setEnabled:![attributes[@"disabled"] boolValue]];
}
if (attributes[@"maxlength"]) {
_maxLength = [attributes[@"maxlength"] integerValue];
Expand Down

0 comments on commit fd2c526

Please sign in to comment.