mirror of https://github.com/abpframework/abp
Merge pull request #9054 from abpframework/fix/9053
Let NgBootstrap typeahead window to get out of the modal borderspull/9055/head
commit
391134525d
@ -1,11 +0,0 @@
|
|||||||
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 +1,2 @@
|
|||||||
|
export * from './ng-bootstrap-config.provider';
|
||||||
export * from './route.provider';
|
export * from './route.provider';
|
||||||
|
@ -0,0 +1,21 @@
|
|||||||
|
import { APP_INITIALIZER } from '@angular/core';
|
||||||
|
import { NgbInputDatepickerConfig, NgbTypeaheadConfig } from '@ng-bootstrap/ng-bootstrap';
|
||||||
|
|
||||||
|
export const NG_BOOTSTRAP_CONFIG_PROVIDERS = [
|
||||||
|
{
|
||||||
|
provide: APP_INITIALIZER,
|
||||||
|
useFactory: configureNgBootstrap,
|
||||||
|
deps: [NgbInputDatepickerConfig, NgbTypeaheadConfig],
|
||||||
|
multi: true,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export function configureNgBootstrap(
|
||||||
|
datepicker: NgbInputDatepickerConfig,
|
||||||
|
typeahead: NgbTypeaheadConfig,
|
||||||
|
) {
|
||||||
|
return () => {
|
||||||
|
datepicker.container = 'body';
|
||||||
|
typeahead.container = 'body';
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in new issue