Skip to content

Commit

Permalink
fix(angular): container classNames (#4854)
Browse files Browse the repository at this point in the history
  • Loading branch information
vltansky committed Aug 24, 2021
1 parent 17bc9bf commit fd092dc
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/angular/src/swiper.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -518,10 +518,7 @@ export class SwiperComponent implements OnInit {
if (!swiperParams.virtual) {
swiperParams.observer = true;
}
const getKeyValue =
<T extends object, U extends keyof T>(key: U) =>
(obj: T) =>
obj[key];

swiperParams.onAny = (eventName: keyof SwiperComponent, ...args: any[]) => {
const emitter = this[('s_' + eventName) as keyof SwiperComponent] as EventEmitter<any>;
if (emitter) {
Expand Down Expand Up @@ -549,7 +546,9 @@ export class SwiperComponent implements OnInit {
this._changeDetectorRef.detectChanges();
};
const _containerClasses: SwiperEvents['_containerClasses'] = (_, classes) => {
this.containerClasses = classes;
setTimeout(() => {
this.containerClasses = classes;
});
};
Object.assign(swiperParams.on, {
_containerClasses,
Expand Down

0 comments on commit fd092dc

Please sign in to comment.