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:
parent
5da27aed94
commit
51f6205258
1 changed files with 3 additions and 1 deletions
|
@ -161,7 +161,9 @@ export default class ModalWidgetDialog extends React.PureComponent<IProps, IStat
|
|||
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 }
|
||||
</AccessibleButton>;
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue