Skip to content

Commit

Permalink
Merge branch 'development' into dev_feature_customBtn
Browse files Browse the repository at this point in the history
  • Loading branch information
saschaB91 authored Aug 2, 2021
2 parents f248850 + c0beddb commit b65cc46
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/modal/bs-modal-ref.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class BsModalRef<T = any> {
/**
* Allow user to ID for the modal. Otherwise, a unique number will be given
*/
id?: number;
id?: number | string;

/**
* Reference to a component inside the modal. Null if modal's been created with TemplateRef
Expand Down
6 changes: 3 additions & 3 deletions src/modal/bs-modal.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class BsModalService {
return this._showModal<T>(content);
}

hide(id?: number) {
hide(id?: number | string) {
if (this.modalsCount === 1 || id == null) {
this._hideBackdrop();
this.resetScrollbar();
Expand Down Expand Up @@ -164,7 +164,7 @@ export class BsModalService {
return bsModalRef;
}

_hideModal(id?: number): void {
_hideModal(id?: number | string): void {
if (id != null) {
const indexToRemove = this.loaders.findIndex(loader => loader.instance?.config.id === id);
const modalLoader = this.loaders[indexToRemove];
Expand Down Expand Up @@ -245,7 +245,7 @@ export class BsModalService {
this.loaders.push(loader);
}

private removeLoaders(id?: number): void {
private removeLoaders(id?: number | string): void {
if (id != null) {
const indexToRemove = this.loaders.findIndex(loader => loader.instance?.config.id === id);
if (indexToRemove >= 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/modal/modal-options.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export class ModalOptions<T = Record<string, unknown>> {
/**
* Allow user to ID for the modal. Otherwise, a unique number will be given
*/
id?: number;
id?: number | string;
/**
* Includes a modal-backdrop element. Alternatively,
* specify static for a backdrop which doesn't close the modal on click.
Expand Down
4 changes: 2 additions & 2 deletions src/typeahead/typeahead.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,10 @@ export class TypeaheadDirective implements OnInit, OnDestroy {
this.typeaheadOnBlur.emit(this._container.active);
}

if (!this.container && this._matches.length === 0) {
if (!this.container && this._matches?.length === 0) {
this.typeaheadOnBlur.emit(new TypeaheadMatch(
this.element.nativeElement.value,
this.element.nativeElement.value,
this.element.nativeElement.value,
false));
}
}
Expand Down

0 comments on commit b65cc46

Please sign in to comment.