Skip to content

Commit d9825ee

Browse files
fix: Filter dropdown responsiveness
1 parent b728a6b commit d9825ee

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

example/src/styles/ExportDropdown.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212
font-family: 'DM Sans', sans-serif;
1313
}
1414

15+
/* Add left: 0px for screens less than or equal to 700px */
16+
@media (max-width: 700px) {
17+
.export-dropdown {
18+
left: 0px;
19+
}
20+
}
21+
1522
.export-dropdown-content {
1623
padding: 8px 0;
1724
}

example/src/styles/FilterDropdown.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.filter-dropdown {
22
position: absolute;
33
top: calc(100% + 8px);
4-
right: 0;
54
min-width: 400px;
65
max-width: 500px;
76
max-height: 500px;
@@ -14,6 +13,13 @@
1413
font-family: 'DM Sans', sans-serif;
1514
}
1615

16+
/* Add right: 0 only for screens greater than 700px */
17+
@media (min-width: 701px) {
18+
.filter-dropdown {
19+
right: 0;
20+
}
21+
}
22+
1723
.filter-dropdown-header {
1824
display: flex;
1925
justify-content: space-between;

src/components/TableHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,13 @@ export const TableHeader: React.FC<TableHeaderProps> = ({
104104
style={{ marginRight: 8, cursor: "pointer" }}
105105
/>
106106
)}
107-
<span style={{width: "16px"}}/>
108107
<span
109108
style={{
110109
display: "inline-flex",
111110
alignItems: "center",
112111
cursor: isColumnSortable ? "pointer" : "default",
113112
userSelect: "none",
113+
marginLeft: index === 0 ? "16px" : "0px",
114114
}}
115115
onClick={
116116
isColumnSortable

0 commit comments

Comments
 (0)