From 2c89be312af0cd69a8504556c4f5cb692b88b302 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 12 May 2021 13:30:00 +0100 Subject: [PATCH] Disable space fields whilst their form is busy --- src/components/structures/SpaceRoomView.tsx | 2 ++ src/components/views/dialogs/SpaceSettingsDialog.tsx | 6 +++--- src/components/views/spaces/SpaceCreateMenu.tsx | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/components/structures/SpaceRoomView.tsx b/src/components/structures/SpaceRoomView.tsx index 004fa5d98f..ed0ae1afe7 100644 --- a/src/components/structures/SpaceRoomView.tsx +++ b/src/components/structures/SpaceRoomView.tsx @@ -451,6 +451,7 @@ const SpaceSetupFirstRooms = ({ space, title, description, onFinished }) => { value={roomNames[i]} onChange={ev => setRoomName(i, ev.target.value)} autoFocus={i === 2} + disabled={busy} />; }); @@ -658,6 +659,7 @@ const SpaceSetupPrivateInvite = ({ space, onFinished }) => { ref={fieldRefs[i]} onValidate={validateEmailRules} autoFocus={i === 0} + disabled={busy} />; }); diff --git a/src/components/views/dialogs/SpaceSettingsDialog.tsx b/src/components/views/dialogs/SpaceSettingsDialog.tsx index dfee5d63e3..dc6052650a 100644 --- a/src/components/views/dialogs/SpaceSettingsDialog.tsx +++ b/src/components/views/dialogs/SpaceSettingsDialog.tsx @@ -116,13 +116,13 @@ const SpaceSettingsDialog: React.FC = ({ matrixClient: cli, space, onFin diff --git a/src/components/views/spaces/SpaceCreateMenu.tsx b/src/components/views/spaces/SpaceCreateMenu.tsx index b461e2230e..0ebf511018 100644 --- a/src/components/views/spaces/SpaceCreateMenu.tsx +++ b/src/components/views/spaces/SpaceCreateMenu.tsx @@ -178,7 +178,7 @@ const SpaceCreateMenu = ({ onFinished }) => {

- + { onChange={ev => setName(ev.target.value)} ref={spaceNameField} onValidate={spaceNameValidator} + disabled={busy} /> { value={topic} onChange={ev => setTopic(ev.target.value)} rows={3} + disabled={busy} />