@@ -74,7 +74,7 @@ type Props = {
7474 /** Handler function for when the user types into email shared link field to fetch contacts. */
7575 getSharedLinkContacts : ( query : string ) => Promise < Array < Contact >> ,
7676 /** An array of initially selected contacts. If none are initially selected, an empty array. */
77- initiallySelectedContacts ? : Array < Contact > ,
77+ initiallySelectedContacts : Array < Contact > ,
7878 intl : IntlShape ,
7979 /** An array of invitee permissions */
8080 inviteePermissions : Array < InviteePermissions > ,
@@ -147,6 +147,7 @@ type State = {
147147
148148class UnifiedShareModal extends React . Component < Props , State > {
149149 static defaultProps = {
150+ initiallySelectedContacts : [ ] ,
150151 focusSharedLinkOnLoad : false ,
151152 trackingProps : {
152153 inviteCollabsEmailTracking : { } ,
@@ -164,12 +165,12 @@ class UnifiedShareModal extends React.Component<Props, State> {
164165
165166 this . state = {
166167 emailSharedLinkContacts : [ ] ,
167- inviteCollabsContacts : props . initiallySelectedContacts || [ ] ,
168+ inviteCollabsContacts : props . initiallySelectedContacts ,
168169 inviteePermissionLevel : '' ,
169170 isConfirmModalOpen : false ,
170171 isEmailLinkSectionExpanded : false ,
171172 isFetching : true ,
172- isInviteSectionExpanded : false ,
173+ isInviteSectionExpanded : ! ! props . initiallySelectedContacts . length ,
173174 showCollaboratorList : false ,
174175 getInitialDataCalled : false ,
175176 shouldRenderFTUXTooltip : false ,
0 commit comments