Skip to content

Commit fc24f87

Browse files
GeoSotXhmikosR
andauthored
Carousel: Remove redundant reference to interval=false from docs (#36545)
* docs: remove redundant reference to `interval=false` * docs: remove redundant reference to `interval=false` from tests Co-authored-by: XhmikosR <[email protected]>
1 parent 13f109e commit fc24f87

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

js/src/carousel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const Default = {
7878
}
7979

8080
const DefaultType = {
81-
interval: '(number|boolean)',
81+
interval: '(number|boolean)', // TODO:v6 remove boolean support
8282
keyboard: 'boolean',
8383
pause: '(string|boolean)',
8484
ride: '(boolean|string)',

js/tests/unit/carousel.spec.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ describe('Carousel', () => {
406406
Simulator.setType('pointer')
407407

408408
fixtureEl.innerHTML = [
409-
'<div class="carousel" data-bs-interval="false">',
409+
'<div class="carousel">',
410410
' <div class="carousel-inner">',
411411
' <div id="item" class="carousel-item">',
412412
' <img alt="">',
@@ -453,7 +453,7 @@ describe('Carousel', () => {
453453
Simulator.setType('pointer')
454454

455455
fixtureEl.innerHTML = [
456-
'<div class="carousel" data-bs-interval="false">',
456+
'<div class="carousel">',
457457
' <div class="carousel-inner">',
458458
' <div id="item" class="carousel-item active">',
459459
' <img alt="">',
@@ -495,7 +495,7 @@ describe('Carousel', () => {
495495
document.documentElement.ontouchstart = noop
496496

497497
fixtureEl.innerHTML = [
498-
'<div class="carousel" data-bs-interval="false">',
498+
'<div class="carousel">',
499499
' <div class="carousel-inner">',
500500
' <div id="item" class="carousel-item">',
501501
' <img alt="">',
@@ -536,7 +536,7 @@ describe('Carousel', () => {
536536
document.documentElement.ontouchstart = noop
537537

538538
fixtureEl.innerHTML = [
539-
'<div class="carousel" data-bs-interval="false">',
539+
'<div class="carousel">',
540540
' <div class="carousel-inner">',
541541
' <div id="item" class="carousel-item active">',
542542
' <img alt="">',
@@ -578,7 +578,7 @@ describe('Carousel', () => {
578578
document.documentElement.ontouchstart = noop
579579

580580
fixtureEl.innerHTML = [
581-
'<div class="carousel" data-bs-interval="false">',
581+
'<div class="carousel">',
582582
' <div class="carousel-inner">',
583583
' <div id="item" class="carousel-item active">',
584584
' <img alt="">',
@@ -622,7 +622,7 @@ describe('Carousel', () => {
622622
clearPointerEvents()
623623
document.documentElement.ontouchstart = noop
624624

625-
fixtureEl.innerHTML = '<div class="carousel" data-bs-interval="false"></div>'
625+
fixtureEl.innerHTML = '<div class="carousel"></div>'
626626

627627
const carouselEl = fixtureEl.querySelector('.carousel')
628628
const carousel = new Carousel(carouselEl)
@@ -910,7 +910,7 @@ describe('Carousel', () => {
910910
it('should not call next when the page is not visible', () => {
911911
fixtureEl.innerHTML = [
912912
'<div style="display: none;">',
913-
' <div class="carousel" data-bs-interval="false"></div>',
913+
' <div class="carousel"></div>',
914914
'</div>'
915915
].join('')
916916

site/content/docs/5.2/components/carousel.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,10 @@ Add `data-bs-interval=""` to a `.carousel-item` to change the amount of time to
208208

209209
### Disable touch swiping
210210

211-
Carousels support swiping left/right on touchscreen devices to move between slides. This can be disabled using the `data-bs-touch` attribute. The example below also does not include the `data-bs-ride` attribute and has `data-bs-interval="false"` so it doesn't autoplay.
211+
Carousels support swiping left/right on touchscreen devices to move between slides. This can be disabled using the `data-bs-touch` attribute. The example below also does not include the `data-bs-ride` attribute so it doesn't autoplay.
212212

213213
{{< example >}}
214-
<div id="carouselExampleControlsNoTouching" class="carousel slide" data-bs-touch="false" data-bs-interval="false">
214+
<div id="carouselExampleControlsNoTouching" class="carousel slide" data-bs-touch="false">
215215
<div class="carousel-inner">
216216
<div class="carousel-item active">
217217
{{< placeholder width="800" height="400" class="bd-placeholder-img-lg d-block w-100" color="#555" background="#777" text="First slide" >}}
@@ -314,7 +314,7 @@ const carousel = new bootstrap.Carousel('#myCarousel')
314314
{{< bs-table >}}
315315
| Name | Type | Default | Description |
316316
| --- | --- | --- | --- |
317-
| `interval` | number | `5000` | The amount of time to delay between automatically cycling an item. If `false`, carousel will not automatically cycle. |
317+
| `interval` | number | `5000` | The amount of time to delay between automatically cycling an item. |
318318
| `keyboard` | boolean | `true` | Whether the carousel should react to keyboard events. |
319319
| `pause` | string, boolean | `"hover"` | If set to `"hover"`, pauses the cycling of the carousel on `mouseenter` and resumes the cycling of the carousel on `mouseleave`. If set to `false`, hovering over the carousel won't pause it. On touch-enabled devices, when set to `"hover"`, cycling will pause on `touchend` (once the user finished interacting with the carousel) for two intervals, before automatically resuming. This is in addition to the mouse behavior. |
320320
| `ride` | string, boolean | `false` | If set to `true`, autoplays the carousel after the user manually cycles the first item. If set to `"carousel"`, autoplays the carousel on load. |

0 commit comments

Comments
 (0)