Procházet zdrojové kódy

Remove top pagination controls

jnfrati před 4 roky
rodič
revize
0464af8444
1 změnil soubory, kde provedl 3 přidání a 53 odebrání
  1. 3 53
      dashboard/src/components/Table.tsx

+ 3 - 53
dashboard/src/components/Table.tsx

@@ -138,55 +138,9 @@ const Table: React.FC<TableProps> = ({
 
 
   return (
   return (
     <TableWrapper>
     <TableWrapper>
-      <Flex>
-        {!disableGlobalFilter && (
-          <GlobalFilter setGlobalFilter={setGlobalFilter} />
-        )}
-        {enablePagination && (
-          <FlexEnd style={{ marginBottom: "15px" }}>
-            <PageCountWrapper>
-              Page size:
-              <Selector
-                activeValue={String(pageSize)}
-                options={[
-                  {
-                    label: "10",
-                    value: "10",
-                  },
-                  {
-                    label: "20",
-                    value: "20",
-                  },
-                  {
-                    label: "50",
-                    value: "50",
-                  },
-                  {
-                    label: "100",
-                    value: "100",
-                  },
-                ]}
-                setActiveValue={(val) => setPageSize(Number(val))}
-                width="70px"
-              ></Selector>
-            </PageCountWrapper>
-            <PaginationActionsWrapper>
-              <PaginationAction
-                disabled={!canPreviousPage}
-                onClick={previousPage}
-              >
-                {"<"}
-              </PaginationAction>
-              <PageCounter>
-                {pageIndex + 1} of {pageCount}
-              </PageCounter>
-              <PaginationAction disabled={!canNextPage} onClick={nextPage}>
-                {">"}
-              </PaginationAction>
-            </PaginationActionsWrapper>
-          </FlexEnd>
-        )}
-      </Flex>
+      {!disableGlobalFilter && (
+        <GlobalFilter setGlobalFilter={setGlobalFilter} />
+      )}
       <StyledTable {...getTableProps()}>
       <StyledTable {...getTableProps()}>
         <StyledTHead>
         <StyledTHead>
           {headerGroups.map((headerGroup) => (
           {headerGroups.map((headerGroup) => (
@@ -265,10 +219,6 @@ const FlexEnd = styled.div`
   width: 100%;
   width: 100%;
 `;
 `;
 
 
-const Flex = styled.div`
-  display: flex;
-`;
-
 const PaginationActionsWrapper = styled.div``;
 const PaginationActionsWrapper = styled.div``;
 
 
 const PageCountWrapper = styled.div`
 const PageCountWrapper = styled.div`