Skip to content

Commit

Permalink
Merge pull request #3794 from cloudfoundry-incubator/fix-route-create
Browse files Browse the repository at this point in the history
Fix domain dropdown on route creation
  • Loading branch information
richard-cox authored Aug 23, 2019
2 parents a1d8143 + dba9de6 commit 7d4ef89
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -265,18 +265,19 @@ export class ApplicationService {
this.orgDomains$ = this.appOrg$.pipe(
switchMap(org => {
const domainsAction = new GetAllOrganizationDomains(org.metadata.guid, this.cfGuid);
const paginationMonitor = this.paginationMonitorFactory.create(
domainsAction.paginationKey,
domainsAction
);
return getPaginationObservables<APIResource<IDomain>>(
{
store: this.store,
action: domainsAction,
paginationMonitor: this.paginationMonitorFactory.create(
domainsAction.paginationKey,
action
)
paginationMonitor
},
true
).entities$;
}),
})
);

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ export class PaginationMonitor<T = any, Y extends AppState = GeneralEntityAppSta
this.currentPage$ = this.createPageObservable(this.pagination$, schema);
}
this.currentPageError$ = this.createErrorObservable(this.pagination$);

}

private createPaginationObservable(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ export function getPaginationKeyFromAction(action: PaginatedAction) {
return apiAction.paginationKey;
}

// TODO: This needs to be a service not just a function! - #3802
export const getPaginationObservables = <T = any, Y extends AppState = AppState>(
{ store, action, paginationMonitor }: {
store: Store<Y>,
Expand All @@ -143,7 +144,6 @@ export const getPaginationObservables = <T = any, Y extends AppState = AppState>
const baseAction = Array.isArray(action) ? action[0] : action;
const paginationKey = paginationMonitor.paginationKey;
const entityKey = paginationMonitor.schema.key;

// FIXME: This will reset pagination every time regardless of if we need to (or just want the pag settings/entities from pagination
// section)
if (baseAction.initialParams) {
Expand Down

0 comments on commit 7d4ef89

Please sign in to comment.