Skip to content

Commit 34ad15d

Browse files
committed
Fix: Bug where text will go outside of select box
1 parent 93f4c3d commit 34ad15d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

frontend/src/app/(auth)/leetcode-dashboard/LeetcodeDashboardTable.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,12 @@ export function LeetcodeDashboardTable({
216216
pageIndex: data.totalPages - 1,
217217
}));
218218
} else {
219+
if (pagination.pageIndex + 1 == 0 && data.totalPages !== 0) {
220+
setPagination((prev) => ({
221+
...prev,
222+
pageIndex: 0,
223+
}));
224+
}
219225
setData(data.questions);
220226
}
221227
});
@@ -243,7 +249,7 @@ export function LeetcodeDashboardTable({
243249
return (
244250
<div className="w-full test">
245251
<div>
246-
<Table className="font-light min-h-[50vh]">
252+
<Table className="font-light min-h-[40vh]">
247253
<TableHeader className="w-full">
248254
<TableRow className="text-white bg-primary-900 font-medium hover:bg-transparent h-[5rem] text-md">
249255
<TableCell colSpan={5} className="pl-10">
@@ -267,7 +273,7 @@ export function LeetcodeDashboardTable({
267273
Filter By
268274
</Button>
269275
{isFilterOpen && (
270-
<div className="absolute right-0 mt-2 w-72 min-h-[184px] bg-primary-800 text-primary-300 border border-gray-300 rounded shadow-lg z-10">
276+
<div className="absolute right-0 mt-2 w-[408px] min-h-[184px] bg-primary-800 text-primary-300 border border-gray-300 rounded shadow-lg z-10">
271277
<div className="flex flex-col place-items-center mt-4 gap-4">
272278
<div className="w-[90%]">
273279
<div className="text-xs">Difficulty</div>

0 commit comments

Comments
 (0)