From 3d90a4eb415a4c0111c88589fcc4733fb8acda6b Mon Sep 17 00:00:00 2001 From: Maicol Battistini Date: Fri, 12 May 2023 15:59:45 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8=20Ricarica=20i=20record=20all?= =?UTF-8?q?a=20chiusura=20di=20una=20DeleteDialog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/ts/Components/Dialogs/DeleteRecordDialog.tsx | 1 - resources/ts/Components/Pages/RecordsPage.tsx | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/resources/ts/Components/Dialogs/DeleteRecordDialog.tsx b/resources/ts/Components/Dialogs/DeleteRecordDialog.tsx index aa7a321e9..ea77f8166 100644 --- a/resources/ts/Components/Dialogs/DeleteRecordDialog.tsx +++ b/resources/ts/Components/Dialogs/DeleteRecordDialog.tsx @@ -56,7 +56,6 @@ export default class DeleteRecordDialog, A extends Del // TODO: Better way for pluralization in i18n void showSnackbar(this.records.length > 1 ? __('Record eliminati!') : __('Record eliminato!')); this.close('deleted'); - m.redraw(); } catch (error) { void showSnackbar(__('Errore durante l\'eliminazione del record! :error', {error: (error as RequestError<{message: string}>).response.message}), false); } diff --git a/resources/ts/Components/Pages/RecordsPage.tsx b/resources/ts/Components/Pages/RecordsPage.tsx index 29351bae3..7363733ea 100644 --- a/resources/ts/Components/Pages/RecordsPage.tsx +++ b/resources/ts/Components/Pages/RecordsPage.tsx @@ -267,6 +267,13 @@ export default abstract class RecordsPage, D extends A if (!state) { state = Stream(); + state.map((open) => { + if (!open) { + this.refreshRecords = true; + m.redraw(); + } + return open; + }); this.deleteRecordsDialogStates.set(key, state); }