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.
|
// be the string entered.
|
||||||
askReason?: boolean;
|
askReason?: boolean;
|
||||||
danger?: 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 => {
|
public onOk = (): void => {
|
||||||
let reason;
|
this.props.onFinished(true, this.reasonField.current?.value);
|
||||||
if (this.reasonField) {
|
|
||||||
reason = this.reasonField.current;
|
|
||||||
}
|
|
||||||
this.props.onFinished(true, reason);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
public onCancel = (): void => {
|
public onCancel = (): void => {
|
||||||
|
|
Loading…
Reference in a new issue