fix(react/dialogs): some type errors

This commit is contained in:
Elian Doran
2025-08-06 18:38:52 +03:00
parent edd18b53d0
commit bde270b73f
12 changed files with 75 additions and 28 deletions

View File

@@ -20,6 +20,7 @@ function ConfirmDialogComponent({ title, message, callback, lastElementToFocus,
return (
<Modal
className="confirm-dialog"
title={title ?? t("confirm.confirmation")}
size="md"
zIndex={2000}
@@ -93,7 +94,7 @@ export default class ConfirmDialog extends ReactBasicWidget {
private showDialog(title: string | null, message: MessageType, callback: ConfirmDialogCallback, isConfirmDeleteNoteBox: boolean) {
this.props = {
title: title,
title: title ?? undefined,
message: (typeof message === "object" && "length" in message ? message[0] : message),
lastElementToFocus: (document.activeElement as HTMLElement),
callback,