mirror of
https://github.com/element-hq/element-web
synced 2024-11-23 01:35:49 +03:00
Merge pull request #6219 from matrix-org/t3chguy/ts/6
Fix ConfirmUserActionDialog returning an input field rather than text
This commit is contained in:
commit
b380e43e4f
1 changed files with 2 additions and 6 deletions
|
@ -38,7 +38,7 @@ interface IProps {
|
|||
// be the string entered.
|
||||
askReason?: boolean;
|
||||
danger?: boolean;
|
||||
onFinished: (success: boolean, reason?: HTMLInputElement) => void;
|
||||
onFinished: (success: boolean, reason?: string) => void;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -59,11 +59,7 @@ export default class ConfirmUserActionDialog extends React.Component<IProps> {
|
|||
};
|
||||
|
||||
public onOk = (): void => {
|
||||
let reason;
|
||||
if (this.reasonField) {
|
||||
reason = this.reasonField.current;
|
||||
}
|
||||
this.props.onFinished(true, reason);
|
||||
this.props.onFinished(true, this.reasonField.current?.value);
|
||||
};
|
||||
|
||||
public onCancel = (): void => {
|
||||
|
|
Loading…
Reference in a new issue