Skip to content

Commit

Permalink
SVY-18496 courasel foundset - update
Browse files Browse the repository at this point in the history
  • Loading branch information
cPecican committed Sep 13, 2023
1 parent 9ecaaca commit aa4fa69
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export class ServoyBootstrapExtraCarousel extends ServoyBaseComponent<HTMLDivEle
@Input() updateRecordSelection: boolean;

innerSlides: Array<Slide>;
foundsetID: number;

loadingImage = 'bootstrapextracomponents/carousel/resources/loading.gif';
missingImage = 'bootstrapextracomponents/carousel/resources/missing.png';
Expand All @@ -46,7 +47,7 @@ export class ServoyBootstrapExtraCarousel extends ServoyBaseComponent<HTMLDivEle
svyOnChanges( changes: SimpleChanges ) {
if ( changes ) {
if ( changes.slidesFoundset ) {
if (!this.innerSlides || (this.innerSlides.length != this.slidesFoundset.serverSize)) {
if (!this.innerSlides || (this.innerSlides.length != this.slidesFoundset.serverSize) || (this.foundsetID != this.slidesFoundset.foundsetId)) {
this.createSlides();
} else {
const index = changes.slidesFoundset.currentValue.selectedRowIndexes[0];
Expand Down Expand Up @@ -139,6 +140,7 @@ export class ServoyBootstrapExtraCarousel extends ServoyBaseComponent<HTMLDivEle
slide.caption = row.caption ? row.caption : null;
this.innerSlides.push( slide );
}
this.foundsetID = this.slidesFoundset.foundsetId
} else {
if ( this.slides !== null && this.slides !== undefined ) {
this.innerSlides = this.slides;
Expand Down

0 comments on commit aa4fa69

Please sign in to comment.