From c040f5c2cfd2704dde2325e67afe837939ec2456 Mon Sep 17 00:00:00 2001 From: Carlos Yacante Date: Fri, 26 Apr 2024 18:58:06 -0300 Subject: [PATCH] fix(pagination): fix width of select page and prevent default in handle change select --- src/components/Pagination/Pagination.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Pagination/Pagination.tsx b/src/components/Pagination/Pagination.tsx index 55f8ef889..c89785c2f 100644 --- a/src/components/Pagination/Pagination.tsx +++ b/src/components/Pagination/Pagination.tsx @@ -84,6 +84,7 @@ const Pagination = ({ const handleChange = useCallback( (e: React.ChangeEvent) => { + e.preventDefault() setSize(Number(e.target.value)) setSelectSliceSize(e.target.value as Pages) }, @@ -106,7 +107,7 @@ const Pagination = ({ role="select-slice-size" name="custom-pagination" value={selectSliceSize} - className="w-12 pl-2 mr-2 outline-none text-primary bg-transparent" + className="min-w-12 pl-2 mr-2 outline-none text-primary bg-transparent" onChange={(e) => handleChange(e)} > {options.map((opt) => {