From bd71bcca5a83380796ee63400c546edd43499fd5 Mon Sep 17 00:00:00 2001 From: Steffen Kolmer Date: Fri, 11 Jun 2021 17:38:16 +0200 Subject: [PATCH] Allow modal widget buttons to be disabled when the modal opens --- src/components/views/dialogs/ModalWidgetDialog.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/views/dialogs/ModalWidgetDialog.tsx b/src/components/views/dialogs/ModalWidgetDialog.tsx index 0c474b160c..df2ed6b335 100644 --- a/src/components/views/dialogs/ModalWidgetDialog.tsx +++ b/src/components/views/dialogs/ModalWidgetDialog.tsx @@ -63,7 +63,8 @@ export default class ModalWidgetDialog extends React.PureComponent = React.createRef(); state: IState = { - disabledButtonIds: [], + disabledButtonIds: (this.props.widgetDefinition.buttons || []).filter(b => b.disabled) + .map(b => b.id), }; constructor(props) {