Skip to content

Commit 16d8e1a

Browse files
committed
Added pagination ui
1 parent 5987c18 commit 16d8e1a

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

client/packages/lowcoder/src/pages/ApplicationV2/HomeLayout.tsx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import { isFetchingFolderElements } from "../../redux/selectors/folderSelector";
3535
import { checkIsMobile } from "util/commonUtils";
3636
import { default as Divider } from "antd/es/divider";
3737
import { ApplicationCategoriesEnum } from "constants/applicationConstants";
38+
import { Pagination } from 'antd';
3839

3940
const Wrapper = styled.div`
4041
display: flex;
@@ -199,6 +200,12 @@ const EmptyView = styled.div`
199200
}
200201
}
201202
`;
203+
const PaginationLayout = styled.div`
204+
display: flex;
205+
justify-content: center;
206+
margin-top: 40px;
207+
margin-bottom: 20px;
208+
`
202209

203210
const LayoutSwitcher = styled.div`
204211
position: absolute;
@@ -307,6 +314,8 @@ export function HomeLayout(props: HomeLayoutProps) {
307314

308315
const { breadcrumb = [], elements = [], localMarketplaceApps = [], globalMarketplaceApps = [], mode } = props;
309316

317+
console.log("folder", elements);
318+
310319
const categoryOptions = [
311320
{ label: <FilterMenuItem>{trans("home.allCategories")}</FilterMenuItem>, value: 'All' },
312321
...Object.entries(ApplicationCategoriesEnum).map(([key, value]) => ({
@@ -325,6 +334,7 @@ export function HomeLayout(props: HomeLayoutProps) {
325334
const [typeFilter, setTypeFilter] = useState<HomeResKey>("All");
326335
const [categoryFilter, setCategoryFilter] = useState<ApplicationCategoriesEnum | "All">("All");
327336
const [searchValue, setSearchValue] = useState("");
337+
const [visibility, setVisibility] = useState(true);
328338
const [layout, setLayout] = useState<HomeLayoutType>(
329339
checkIsMobile(window.innerWidth) ? "card" : getHomeLayout()
330340
);
@@ -415,6 +425,8 @@ export function HomeLayout(props: HomeLayoutProps) {
415425
}
416426
);
417427

428+
console.log(resList);
429+
418430
const getFilterMenuItem = (type: HomeResTypeEnum) => {
419431
const Icon = HomeResInfo[type].icon;
420432
return {
@@ -603,7 +615,12 @@ export function HomeLayout(props: HomeLayoutProps) {
603615
</>
604616
)}
605617
</ContentWrapper>
606-
618+
{visibility ? <div>
619+
<Divider />
620+
<PaginationLayout>
621+
<Pagination total={50} showSizeChanger />
622+
</PaginationLayout>
623+
</div> : null}
607624
</Card>
608625

609626
</HomeView>

0 commit comments

Comments
 (0)