FIX: Minor formatting issues

This commit is contained in:
Nicolás Hatcher
2025-01-01 12:16:31 +01:00
committed by Nicolás Hatcher Andrés
parent 8ab1382e75
commit ddc785e7a6
2 changed files with 10 additions and 8 deletions

View File

@@ -29,11 +29,11 @@ function NamedRangeActive(properties: NamedRangeProperties) {
const [newScope, setNewScope] = useState(scope); const [newScope, setNewScope] = useState(scope);
const [newFormula, setNewFormula] = useState(formula); const [newFormula, setNewFormula] = useState(formula);
// todo: add error messages for validations // TODO: add error messages for validations
const [nameError, setNameError] = useState(false); const [nameError, setNameError] = useState(false);
const [formulaError, setFormulaError] = useState(false); const [formulaError, setFormulaError] = useState(false);
//todo: move logic to NameManagerDialog // TODO: move logic to NameManagerDialog
const handleSaveUpdate = () => { const handleSaveUpdate = () => {
const definedNamesModel = model.getDefinedNameList(); const definedNamesModel = model.getDefinedNameList();
@@ -85,7 +85,9 @@ function NamedRangeActive(properties: NamedRangeProperties) {
}} }}
> >
<MenuItem value={"global"}> <MenuItem value={"global"}>
{`${t("name_manager_dialog.workbook")} ${t("name_manager_dialog.global")}`} {`${t("name_manager_dialog.workbook")} ${t(
"name_manager_dialog.global",
)}`}
</MenuItem> </MenuItem>
{worksheets.map((option, index) => ( {worksheets.map((option, index) => (
<MenuItem key={option.name} value={index}> <MenuItem key={option.name} value={index}>

View File

@@ -26,7 +26,7 @@ function NamedRangeInactive(properties: NamedRangeInactiveProperties) {
showOptions, showOptions,
} = properties; } = properties;
//todo: move logic to NameManagerDialog // TODO: move logic to NameManagerDialog
const handleDelete = () => { const handleDelete = () => {
try { try {
model.deleteDefinedName(name, scope); model.deleteDefinedName(name, scope);
@@ -36,7 +36,7 @@ function NamedRangeInactive(properties: NamedRangeInactiveProperties) {
onDelete(); onDelete();
}; };
//todo: pass the name, avoid logic // TODO: pass the name, avoid logic
const scopeName = const scopeName =
worksheets.find((sheet, index) => index === scope)?.name || worksheets.find((sheet, index) => index === scope)?.name ||
`${t("name_manager_dialog.workbook")} ${t("name_manager_dialog.global")}`; `${t("name_manager_dialog.workbook")} ${t("name_manager_dialog.global")}`;