Skip to content

Commit

Permalink
style: #1764, changed style of rows per page dropboxSigned-off-by: Sa…
Browse files Browse the repository at this point in the history
…niya Kalamkar <[email protected]>
  • Loading branch information
SaniyaKalamkar committed Jan 22, 2025
1 parent 4750e3a commit 0680aa3
Showing 1 changed file with 26 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ const DEFAULT_PAGE_SIZE_OPTIONS = [2, 4, 6, 8, 10, 15, 20];

const DEFAULT_FILTER_VALUE = "All";




export interface K8sEventsProps {
namespaceId: string;
pipelineId?: string;
Expand Down Expand Up @@ -92,7 +89,7 @@ export function K8sEvents({
}
setFilteredEvents(pages[page - 1] || []);
setTotalPages(pages.length);
}, [data, page, typeFilter]);
}, [data, page, pageSize, typeFilter]);

const handlePageChange = useCallback(
(event: React.ChangeEvent<unknown>, value: number) => {
Expand Down Expand Up @@ -122,11 +119,6 @@ export function K8sEvents({
},
[]
);





const typeCounts = useMemo(() => {
return (
<Box
Expand Down Expand Up @@ -184,33 +176,35 @@ export function K8sEvents({
<Box
sx={{
display: "flex",
flexDirection: "column",
alignItems: "flex-start",
flexDirection: "column",
marginRight: "0.8rem",
fontSize: "1.6rem",
color: "#6B6C72"
}}
>
<label style={{ fontSize: "1.4rem", color: "#6B6C72" }}>
Rows Per Page:
<label>
Rows Per Page
</label>
<Select
value={pageSize}
onChange={(event) => {
const newSize = Number(event.target.value);
setPageSize(newSize);
setPage(1);
}}
sx={{
fontSize: "1.6rem",
background: "#fff",
border: "1px solid #6B6C72",
height: "3.4rem",
}}
>
{DEFAULT_PAGE_SIZE_OPTIONS.map((size) => (
<MenuItem key={size} value={size}>
{size}
</MenuItem>
))}
</Select>
value={pageSize}
onChange={(event) => {
const newSize = Number(event.target.value);
setPageSize(newSize);
setPage(1);
}}
sx={{
fontSize: "1.6rem",
background: "#fff",
border: "1px solid #6B6C72",
height: "3.4rem",
}}
>
{DEFAULT_PAGE_SIZE_OPTIONS.map((size) => (
<MenuItem key={size} value={size} sx={{ fontSize: "1.6rem" }}>
{size}
</MenuItem>
))}
</Select>
</Box>
</Box>
);
Expand Down

0 comments on commit 0680aa3

Please sign in to comment.