|
@@ -69,7 +69,7 @@ type Props = {
|
|
|
* Id of the project (most likely from the URL)
|
|
|
* on which the modal was opened
|
|
|
*/
|
|
|
- comingFromProjectId: string;
|
|
|
+ comingFromProjectId?: string;
|
|
|
};
|
|
|
|
|
|
class ContextPickerModal extends React.Component<Props> {
|
|
@@ -259,7 +259,8 @@ class ContextPickerModal extends React.Component<Props> {
|
|
|
ref={ref => {
|
|
|
this.projectSelect = ref;
|
|
|
this.focusProjectSelector();
|
|
|
- this.focusProjectOption(comingFromProjectId, projects);
|
|
|
+ comingFromProjectId &&
|
|
|
+ this.focusProjectOption(comingFromProjectId, projects);
|
|
|
}}
|
|
|
placeholder={t('Select a Project')}
|
|
|
name="project"
|
|
@@ -275,7 +276,10 @@ class ContextPickerModal extends React.Component<Props> {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-type ContainerProps = {};
|
|
|
+type ContainerProps = Omit<
|
|
|
+ Props,
|
|
|
+ 'projects' | 'loading' | 'organizations' | 'organization' | 'onSelectOrganization'
|
|
|
+>;
|
|
|
|
|
|
type ContainerState = {
|
|
|
organizations?: Organization[];
|