Pre-populate create room dialog name when going from room directory

This commit is contained in:
Michael Telatynski 2021-05-19 19:20:58 +01:00
parent b3aade075d
commit 8b67cdb80b
3 changed files with 9 additions and 4 deletions

View file

@ -34,6 +34,7 @@ import BaseDialog from "../dialogs/BaseDialog";
interface IProps {
defaultPublic?: boolean;
defaultName?: string;
parentSpace?: Room;
onFinished(proceed: boolean, opts?: IOpts): void;
}
@ -62,7 +63,7 @@ export default class CreateRoomDialog extends React.Component<IProps, IState> {
this.state = {
isPublic: this.props.defaultPublic || false,
isEncrypted: privateShouldBeEncrypted(),
name: "",
name: this.props.defaultName || "",
topic: "",
alias: "",
detailsOpen: false,