Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/components/input/input-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ export class InputBase extends Ion {
* @private
*/
checkClearOnEdit(inputValue: string) {
if(!this._clearOnEdit) { return; }
if (!this._clearOnEdit) {
return;
}

// Did the input value change after it was blurred and edited?
if (this._didBlurAfterEdit && this.hasValue()) {
Expand Down Expand Up @@ -269,7 +271,7 @@ export class InputBase extends Ion {
* @private
*/
onKeydown(val: any) {
if(this._clearOnEdit) {
if (this._clearOnEdit) {
this.checkClearOnEdit(val);
}
}
Expand Down Expand Up @@ -319,7 +321,7 @@ export class InputBase extends Ion {
}

// If clearOnEdit is enabled and the input blurred but has a value, set a flag
if(this._clearOnEdit && !inputHasFocus && this.hasValue()) {
if (this._clearOnEdit && !inputHasFocus && this.hasValue()) {
this._didBlurAfterEdit = true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/input/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export class TextInput extends InputBase {
}

// By default, password inputs clear after focus when they have content
if(this.type === 'password' && this.clearOnEdit !== false) {
if (this.type === 'password' && this.clearOnEdit !== false) {
this.clearOnEdit = true;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/input/native-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ export class NativeInput {
_change(ev: any) {
this.valueChange.emit(ev.target.value);
}

@HostListener('keydown', ['$event'])
_keyDown(ev: any) {
if(ev) {
if (ev) {
ev.target && this.keydown.emit(ev.target.value);
}
}
Expand Down