Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

[Docs]: Add Null return value type in code example #2429

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 1 addition & 1 deletion docs/Advanced-Topics-Key-Bindings.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ First, let's define our key binding function:
import {getDefaultKeyBinding, KeyBindingUtil} from 'draft-js';
const {hasCommandModifier} = KeyBindingUtil;

function myKeyBindingFn(e: SyntheticKeyboardEvent): string {
function myKeyBindingFn(e: SyntheticKeyboardEvent): string | null {
if (e.keyCode === 83 /* `S` key */ && hasCommandModifier(e)) {
return 'myeditor-save';
}
Expand Down