Skip to content
Open
Changes from 5 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
9 changes: 9 additions & 0 deletions src/inputs/input-textarea.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,13 @@ export class InputTextareaComponent extends InputBase implements OnInit {
}

public config: InlineTextareaConfig;

public onKeyPress(event: KeyboardEvent) {
super.onKeyPress(event);
if ((this.config.saveOnEnter && event.charCode === 13 && !event.shiftKey) ||
(!this.config.saveOnEnter && event.charCode === 13 && event.shiftKey)) {
this.save();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(A && B && !C) || (!A && B && C)

What's the common factor? ;-)

this.onEscape(event);
}
}
}