Fix modal buttons not being disabled by disabling them

Looks like this was just a missed block of code, but also the important bit.

Fixes https://github.com/vector-im/element-web/issues/15801
This commit is contained in:
Travis Ralston 2020-11-25 18:48:18 -07:00
parent 5da27aed94
commit 51f6205258

View file

@ -161,7 +161,9 @@ export default class ModalWidgetDialog extends React.PureComponent<IProps, IStat
this.state.messaging.notifyModalWidgetButtonClicked(def.id); this.state.messaging.notifyModalWidgetButtonClicked(def.id);
}; };
return <AccessibleButton key={def.id} kind={kind} onClick={onClick}> const isDisabled = this.state.disabledButtonIds.includes(def.id);
return <AccessibleButton key={def.id} kind={kind} onClick={onClick} disabled={isDisabled}>
{ def.label } { def.label }
</AccessibleButton>; </AccessibleButton>;
}); });