fix: set container to body of ngbDatepicker

pull/8957/head
bnymncoskuner 4 years ago
parent 7b353c15c4
commit f83d4ec074

@ -0,0 +1,11 @@
import { Injector } from '@angular/core';
import { NgbInputDatepickerConfig } from '@ng-bootstrap/ng-bootstrap';
export function initDatepickerConfig(injector: Injector) {
const datepickerConfig = injector.get(NgbInputDatepickerConfig, null);
if (datepickerConfig) {
datepickerConfig.container = 'body';
}
return () => {};
}

@ -1,2 +1,3 @@
export * from './error.handler';
export * from './lazy-style.handler';
export * from './datepicker-config';

@ -38,6 +38,7 @@ import { THEME_SHARED_APPEND_CONTENT } from './tokens/append-content.token';
import { HTTP_ERROR_CONFIG, httpErrorConfigFactory } from './tokens/http-error.token';
import { DateParserFormatter } from './utils/date-parser-formatter';
import { ModalCloseDirective } from './components/modal/modal-close.directive';
import { initDatepickerConfig } from './handlers/datepicker-config';
const declarationsWithExports = [
BreadcrumbComponent,
@ -110,6 +111,12 @@ export class ThemeSharedModule {
deps: [Injector],
useFactory: initLazyStyleHandler,
},
{
provide: APP_INITIALIZER,
multi: true,
deps: [Injector],
useFactory: initDatepickerConfig,
},
{ provide: HTTP_ERROR_CONFIG, useValue: httpErrorConfig },
{
provide: 'HTTP_ERROR_CONFIG',

@ -8,7 +8,7 @@ export { BOOTSTRAP } from './lib/constants/styles';
export * from './lib/constants/validation';
export * from './lib/directives';
export * from './lib/enums';
export { ErrorHandler } from './lib/handlers';
export * from './lib/handlers';
export * from './lib/models';
export * from './lib/providers';
export * from './lib/services';

Loading…
Cancel
Save