investigation clean up
This commit is contained in:
@@ -111,8 +111,6 @@ export class UmbModalRouteRegistration<UmbModalTokenData extends object = object
|
||||
};
|
||||
|
||||
routeSetup(router: IRouterSlot, modalContext: UmbModalContext, params: Params) {
|
||||
console.log('routeSetup', this.active);
|
||||
|
||||
// If already open, don't do anything:
|
||||
if (this.active) return;
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@ import '../../src/packages/search/search-modal/search-modal.element';
|
||||
|
||||
import type { UUIModalDialogElement, UUIModalSidebarSize } from '@umbraco-ui/uui';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
import { appendToFrozenArray } from '../observable-api';
|
||||
import { UmbModalHandler, UmbModalHandlerClass } from './modal-handler';
|
||||
import type { UmbModalToken } from './token/modal-token';
|
||||
import { UmbContextToken } from '@umbraco-cms/backoffice/context-api';
|
||||
import { UmbControllerHostElement } from '@umbraco-cms/backoffice/controller-api';
|
||||
import { appendToFrozenArray } from '../observable-api';
|
||||
|
||||
export type UmbModalType = 'dialog' | 'sidebar';
|
||||
|
||||
|
||||
@@ -98,10 +98,8 @@ export class UmbRouteContext {
|
||||
public _internal_modalRouterChanged(activeModalPath: string | undefined) {
|
||||
if (this.#activeModalPath === activeModalPath) return;
|
||||
if (this.#activeModalPath) {
|
||||
console.log('_internal_modalRouterChanged', this.#activeModalPath);
|
||||
// If if there is a modal using the old path.
|
||||
const activeModal = this.#modalRegistrations.find((registration) => {
|
||||
console.log('/' + registration.generateModalPath(), ' === ', this.#activeModalPath);
|
||||
return '/' + registration.generateModalPath() === this.#activeModalPath;
|
||||
});
|
||||
if (activeModal) {
|
||||
|
||||
Reference in New Issue
Block a user