@@ -277,12 +277,12 @@ class Carousel extends UI5Element {
277
277
content : {
278
278
"ui5-carousel-content" : true ,
279
279
"ui5-carousel-content-no-animation" : this . shouldAnimate ,
280
- "ui5-carousel-content-has-navigation" : ! this . hideNavigation ,
281
- "ui5-carousel-content-has-navigation-and-buttons" : ! this . hideNavigation && this . arrowsPlacement === CarouselArrowsPlacement . Navigation ,
280
+ "ui5-carousel-content-has-navigation" : this . showNavigationArrows ,
281
+ "ui5-carousel-content-has-navigation-and-buttons" : this . showNavigationArrows && this . arrowsPlacement === CarouselArrowsPlacement . Navigation ,
282
282
} ,
283
283
navigation : {
284
284
"ui5-carousel-navigation-wrapper" : true ,
285
- "ui5-carousel-navigation-with-buttons" : this . arrowsPlacement === CarouselArrowsPlacement . Navigation ,
285
+ "ui5-carousel-navigation-with-buttons" : this . showNavigationArrows && this . arrowsPlacement === CarouselArrowsPlacement . Navigation ,
286
286
} ,
287
287
page : {
288
288
"ui5-carousel-page" : true ,
@@ -304,9 +304,11 @@ class Carousel extends UI5Element {
304
304
}
305
305
306
306
get arrows ( ) {
307
+ const showArrows = this . showNavigationArrows && isDesktop ( ) ;
308
+
307
309
return {
308
- content : isDesktop ( ) && this . arrowsPlacement === CarouselArrowsPlacement . Content ,
309
- navigation : isDesktop ( ) && this . arrowsPlacement === CarouselArrowsPlacement . Navigation ,
310
+ content : showArrows && this . arrowsPlacement === CarouselArrowsPlacement . Content ,
311
+ navigation : showArrows && this . arrowsPlacement === CarouselArrowsPlacement . Navigation ,
310
312
} ;
311
313
}
312
314
@@ -318,6 +320,10 @@ class Carousel extends UI5Element {
318
320
return this . selectedIndex + 1 ;
319
321
}
320
322
323
+ get showNavigationArrows ( ) {
324
+ return ! this . hideNavigation && this . pages . length > 1 ;
325
+ }
326
+
321
327
static async onDefine ( ) {
322
328
await Promise . all ( [
323
329
fetchI18nBundle ( "@ui5/webcomponents" ) ,
0 commit comments