File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
packages/core/src/internal/data-grid-overlay-editor Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ interface DataGridOverlayEditorProps {
3636 readonly onFinishEditing : ( newCell : GridCell | undefined , movement : readonly [ - 1 | 0 | 1 , - 1 | 0 | 1 ] ) => void ;
3737 readonly forceEditMode : boolean ;
3838 readonly highlight : boolean ;
39- readonly portalElementRef ?: React . RefObject < HTMLElement >
39+ readonly portalElementRef ?: React . RefObject < HTMLElement > ;
4040 readonly imageEditorOverride ?: ImageEditorType ;
4141 readonly getCellRenderer : GetCellRendererCallback ;
4242 readonly markdownDivCreateNode ?: ( content : string ) => DocumentFragment ;
@@ -132,7 +132,12 @@ const DataGridOverlayEditor: React.FunctionComponent<DataGridOverlayEditorProps>
132132 event . stopPropagation ( ) ;
133133 event . preventDefault ( ) ;
134134 customMotion . current = [ 0 , 0 ] ;
135- } else if ( event . key === "Enter" && ! event . shiftKey ) {
135+ } else if (
136+ event . key === "Enter" &&
137+ // The shift key is reserved for multi-line editing
138+ // to allow inserting new lines without closing the editor.
139+ ! event . shiftKey
140+ ) {
136141 event . stopPropagation ( ) ;
137142 event . preventDefault ( ) ;
138143 customMotion . current = [ 0 , 1 ] ;
You can’t perform that action at this time.
0 commit comments