Skip to content

Commit c99a661

Browse files
feat: Horizontal scroll enabling and pagination view (#32)
1 parent 1dd5450 commit c99a661

File tree

1 file changed

+36
-5
lines changed

1 file changed

+36
-5
lines changed

src/styles/MultiLevelTable.css

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
min-height: 0;
3939
/* Ensure horizontal scroll works properly */
4040
white-space: nowrap;
41+
/* Force horizontal scroll for all screen sizes below 1200px */
42+
min-width: 0;
4143
}
4244

4345
/* Custom scrollbar styling */
@@ -78,7 +80,7 @@
7880
margin-bottom: 0;
7981
padding-bottom: 0;
8082
/* Ensure pagination maintains its layout on smaller screens */
81-
min-width: 1200px; /* Match table minimum width */
83+
width: 100%;
8284
overflow-x: auto; /* Allow horizontal scroll if needed */
8385
}
8486

@@ -91,9 +93,11 @@
9193
border-radius: 12px;
9294
overflow: hidden;
9395
table-layout: fixed;
94-
min-width: 1200px; /* Increased minimum width to ensure all content fits properly */
96+
min-width: 1200px; /* Minimum width to ensure all content fits properly */
9597
margin: 0; /* Remove any margin */
9698
padding: 0; /* Remove any padding */
99+
/* Ensure table doesn't shrink below minimum width */
100+
flex-shrink: 0;
97101
}
98102

99103
/* Ensure table cells don't wrap content */
@@ -350,11 +354,11 @@
350354
flex: 1;
351355
}
352356

353-
354357
/* Ensure table scrolls horizontally on mobile */
355358
.table-responsive-container {
356359
overflow-x: auto;
357-
min-width: 1200px; /* Match table minimum width */
360+
min-width: 0; /* Allow container to shrink */
361+
width: 100%;
358362
}
359363

360364
/* Ensure table headers and cells don't break */
@@ -425,6 +429,18 @@
425429
height: 44px;
426430
font-size: 13px;
427431
}
432+
433+
/* Ensure horizontal scrolling works on very small screens */
434+
.table-responsive-container {
435+
overflow-x: auto !important;
436+
min-width: 0 !important;
437+
width: 100% !important;
438+
}
439+
440+
.main-table-container {
441+
min-width: 1200px !important;
442+
width: 1200px !important;
443+
}
428444
}
429445

430446
/* ≤ 1024 px – turn the whole header into a 2‑row grid */
@@ -489,7 +505,8 @@
489505

490506
.table-responsive-container {
491507
overflow-x: auto;
492-
min-width: 1200px; /* Match table minimum width */
508+
min-width: 0; /* Allow container to shrink */
509+
width: 100%;
493510
}
494511

495512
.main-table-container th,
@@ -499,3 +516,17 @@
499516
text-overflow: ellipsis;
500517
}
501518
}
519+
520+
/* Ensure horizontal scrolling for all screen sizes below 1200px */
521+
@media (max-width: 1199px) {
522+
.table-responsive-container {
523+
overflow-x: auto !important;
524+
min-width: 0 !important;
525+
width: 100% !important;
526+
}
527+
528+
.main-table-container {
529+
min-width: 1200px !important;
530+
width: 1200px !important;
531+
}
532+
}

0 commit comments

Comments
 (0)