Skip to content

Commit

Permalink
Merge pull request #30562 from tienifr/fix/27902
Browse files Browse the repository at this point in the history
  • Loading branch information
cead22 authored Nov 6, 2023
2 parents 1c1fb1d + f989d98 commit 12ff3ea
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/pages/workspace/WorkspaceInviteMessagePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class WorkspaceInviteMessagePage extends React.Component {
this.validate = this.validate.bind(this);
this.openPrivacyURL = this.openPrivacyURL.bind(this);
this.state = {
welcomeNote: this.getDefaultWelcomeNote(),
welcomeNote: this.props.savedWelcomeMessage || this.getDefaultWelcomeNote(),
};
}

Expand Down Expand Up @@ -228,6 +228,7 @@ class WorkspaceInviteMessagePage extends React.Component {
defaultValue={this.state.welcomeNote}
value={this.state.welcomeNote}
onChangeText={(text) => this.setState({welcomeNote: text})}
shouldSaveDraft
/>
</View>
</Form>
Expand All @@ -251,6 +252,10 @@ export default compose(
invitedEmailsToAccountIDsDraft: {
key: ({route}) => `${ONYXKEYS.COLLECTION.WORKSPACE_INVITE_MEMBERS_DRAFT}${route.params.policyID.toString()}`,
},
savedWelcomeMessage: {
key: `${ONYXKEYS.FORMS.WORKSPACE_INVITE_MESSAGE_FORM}Draft`,
selector: (draft) => (draft ? draft.welcomeMessage : ''),
},
}),
withNavigationFocus,
)(WorkspaceInviteMessagePage);

0 comments on commit 12ff3ea

Please sign in to comment.