Allow modal widget buttons to be disabled when the modal opens

pull/21833/head
Steffen Kolmer 2021-06-11 17:38:16 +02:00
parent 015890477d
commit bd71bcca5a
1 changed files with 2 additions and 1 deletions

View File

@ -63,7 +63,8 @@ export default class ModalWidgetDialog extends React.PureComponent<IProps, IStat
private appFrame: React.RefObject<HTMLIFrameElement> = React.createRef(); private appFrame: React.RefObject<HTMLIFrameElement> = React.createRef();
state: IState = { state: IState = {
disabledButtonIds: [], disabledButtonIds: (this.props.widgetDefinition.buttons || []).filter(b => b.disabled)
.map(b => b.id),
}; };
constructor(props) { constructor(props) {