fix editorMode: inline cells waiting to render even when disabled

This commit is contained in:
Sidney Alcantara
2022-11-16 18:12:30 +11:00
parent 2d2cd424f3
commit b2747ddddf

View File

@@ -119,9 +119,6 @@ export default function withTableCell(
rowHeight,
};
// If the inline editor cell is not ready to be rendered, display nothing
if (editorMode === "inline" && !inlineEditorReady) return null;
// Show display cell, unless if editorMode is inline
const displayCell = (
<div
@@ -135,6 +132,9 @@ export default function withTableCell(
if (disabled || (editorMode !== "inline" && !focusInsideCell))
return displayCell;
// If the inline editor cell is not ready to be rendered, display nothing
if (editorMode === "inline" && !inlineEditorReady) return null;
// Show displayCell as a fallback if intentionally null
const editorCell = EditorCellComponent ? (
<Suspense fallback={null}>