Closed ilianiv closed 5 years ago
If a property binding gets changed all other properties get lost :(
Example:
counter: boolean = true; separator: string = ' of ';
<img [src]="image.path" height="150" lightbox [counter]="counter" [counterSeparator]="separator" /> <button (click)="counter = !counter">Toggle counter</button>
When counter changes counterSeparator will be lost because lightbox's properties will be replaced with changes from ngOnChanges() but only counter was changed so counterSeparator is missing in changes object. See https://github.com/crystalui/angular-lightbox/blob/master/projects/crystalui/angular-lightbox/src/lib/lightbox.directive.ts#L79
counter
counterSeparator
I'm sorry the issue is for the angular project https://github.com/crystalui/angular-lightbox/issues/4
If a property binding gets changed all other properties get lost :(
Example:
When
counter
changescounterSeparator
will be lost because lightbox's properties will be replaced with changes from ngOnChanges() but onlycounter
was changed socounterSeparator
is missing in changes object.See https://github.com/crystalui/angular-lightbox/blob/master/projects/crystalui/angular-lightbox/src/lib/lightbox.directive.ts#L79