FIX: More fixes to the cell editor
* Font family is Inter, font size 13, line-width 22 * Correct vertical align for multiline text * Entering multiline text sets the height of the row (!)
This commit is contained in:
committed by
Nicolás Hatcher Andrés
parent
585e594d8d
commit
9a46e5ccc7
@@ -95,13 +95,11 @@ const Editor = (options: EditorOptions) => {
|
||||
|
||||
const { onKeyDown } = useKeyDown({
|
||||
model,
|
||||
text,
|
||||
onEditEnd,
|
||||
onTextUpdated,
|
||||
workbookState,
|
||||
textareaRef,
|
||||
setStyledFormula,
|
||||
setText,
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
@@ -124,6 +122,10 @@ const Editor = (options: EditorOptions) => {
|
||||
if (scrollWidth > editorWidth - 5) {
|
||||
cell.editorWidth = scrollWidth + 10;
|
||||
}
|
||||
const scrollHeight = formulaRef.current.scrollHeight;
|
||||
if (scrollHeight > editorHeight) {
|
||||
cell.editorHeight = scrollHeight;
|
||||
}
|
||||
}
|
||||
}, [text, workbookState]);
|
||||
|
||||
@@ -203,6 +205,8 @@ const Editor = (options: EditorOptions) => {
|
||||
overflow: "hidden",
|
||||
display: showEditor,
|
||||
background: "#FFF",
|
||||
fontFamily: "Inter",
|
||||
fontSize: "13px"
|
||||
}}
|
||||
>
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user