1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-07 10:46:24 +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:
Michael Telatynski
2021-06-21 08:53:43 +01:00
committed by GitHub

View File

@@ -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 => {