diff --git a/webapp/IronCalc/src/components/SheetTabBar/SheetTab.tsx b/webapp/IronCalc/src/components/SheetTabBar/SheetTab.tsx index ca80e51..b0ef55a 100644 --- a/webapp/IronCalc/src/components/SheetTabBar/SheetTab.tsx +++ b/webapp/IronCalc/src/components/SheetTabBar/SheetTab.tsx @@ -94,8 +94,11 @@ function SheetTab(props: SheetTabProps) { const handleSave = () => { if (editingName.trim() !== "") { props.onRenamed(editingName.trim()); + setIsEditing(false); + } else { + setEditingName(name); + setIsEditing(false); } - setIsEditing(false); }; const handleCancel = () => { @@ -153,18 +156,14 @@ function SheetTab(props: SheetTabProps) { onClick={(e) => e.stopPropagation()} spellCheck={false} /> - + ) : ( <> {name} - + @@ -361,6 +360,7 @@ const StyledInput = styled(Input)` flex-grow: 1; & .MuiInputBase-input { font-family: Inter; + background-color: ${theme.palette.common.white}; font-weight: inherit; padding: 6px 0px; outline: 1px solid ${theme.palette.primary.main};