Skip to content

Commit bcc8136

Browse files
committed
final fix on carousel
1 parent d597705 commit bcc8136

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

clients/search-component/src/TrieveModal/Chat/Carousel.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -82,17 +82,17 @@ export const Carousel = ({ children }: { children: React.ReactNode }) => {
8282
return (
8383
<div className="carousel-root">
8484
<ul className="carousel-scroll" ref={scrollRef}>
85-
{allProductsCarousel.map((child, index) => child ? (
85+
{allProductsCarousel.map((child, index) => (
8686
<li
87-
className="carousel-item"
87+
className={child ? "carousel-item carousel-item-visibile" : "carousel-item carousel-item-hidden"}
8888
style={{
8989
width: `calc(100% / ${itemsPerPage})`,
9090
}}
9191
key={index}
9292
>
9393
{child}
9494
</li>
95-
) : null)}
95+
))}
9696
</ul>
9797
{numPages > 1 && (
9898
<div className="carousel-controls">

clients/search-component/src/TrieveModal/index.css

+8
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,14 @@ body {
336336
box-sizing: border-box;
337337
}
338338

339+
.carousel-item-hidden {
340+
visibility: hidden;
341+
}
342+
343+
.carousel-item-visibile {
344+
visibility: visible;
345+
}
346+
339347
.carousel-controls {
340348
display: flex;
341349
justify-content: center;

0 commit comments

Comments
 (0)