aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/auth/Invite.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/auth/Invite.js')
-rw-r--r--src/components/auth/Invite.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/components/auth/Invite.js b/src/components/auth/Invite.js
index 519691ede..df8980314 100644
--- a/src/components/auth/Invite.js
+++ b/src/components/auth/Invite.js
@@ -65,7 +65,7 @@ class Invite extends Component {
65 { 65 {
66 fields: { 66 fields: {
67 invite: [ 67 invite: [
68 ...Array(3).fill({ 68 ...Array.from({ length: 3 }).fill({
69 fields: { 69 fields: {
70 name: { 70 name: {
71 label: this.props.intl.formatMessage(messages.nameLabel), 71 label: this.props.intl.formatMessage(messages.nameLabel),
@@ -95,19 +95,19 @@ class Invite extends Component {
95 this.props.intl, 95 this.props.intl,
96 ); 96 );
97 97
98 document.querySelector('input:first-child').focus(); 98 document.querySelector('input:first-child')?.focus();
99 } 99 }
100 100
101 submit(e) { 101 submit(e) {
102 e.preventDefault(); 102 e.preventDefault();
103 103
104 this.form.submit({ 104 this.form?.submit({
105 onSuccess: form => { 105 onSuccess: form => {
106 this.props.onSubmit({ invites: form.values().invite }); 106 this.props.onSubmit({ invites: form.values().invite });
107 107
108 this.form.clear(); 108 this.form?.clear();
109 // this.form.$('invite.0.name').focus(); // path accepted but does not focus ;( 109 // this.form.$('invite.0.name').focus(); // path accepted but does not focus ;(
110 document.querySelector('input:first-child').focus(); 110 document.querySelector('input:first-child')?.focus();
111 this.setState({ showSuccessInfo: true }); 111 this.setState({ showSuccessInfo: true });
112 }, 112 },
113 onError: () => {}, 113 onError: () => {},