From 5142f5656b4538b5425fcb4704181072cd91635a Mon Sep 17 00:00:00 2001 From: SimonGschnell Date: Wed, 17 Apr 2024 15:12:55 +0200 Subject: [PATCH] passes the page_size down from the parent component to the child component --- public/js/components/Cis/Cms/Content.js | 5 +++-- public/js/components/Pagination/Pagination.js | 7 ++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/public/js/components/Cis/Cms/Content.js b/public/js/components/Cis/Cms/Content.js index 7fe6bb5c1..9ba98f2a1 100644 --- a/public/js/components/Cis/Cms/Content.js +++ b/public/js/components/Cis/Cms/Content.js @@ -8,6 +8,7 @@ export default { return { content: null, maxPageCount: 0, + page_size: 10, }; }, methods: { @@ -18,7 +19,7 @@ export default { }, }, created() { - Vue.$fhcapi.Cms.getNews(1, 10).then((result) => { + Vue.$fhcapi.Cms.getNews(1, this.page_size).then((result) => { this.content = result.data; }); @@ -27,7 +28,7 @@ export default { }); }, template: /*html*/ ` - +
`, }; diff --git a/public/js/components/Pagination/Pagination.js b/public/js/components/Pagination/Pagination.js index 666f03929..ce27180f7 100644 --- a/public/js/components/Pagination/Pagination.js +++ b/public/js/components/Pagination/Pagination.js @@ -2,11 +2,16 @@ export default { components: { paginator: primevue.paginator, }, + emits: ["update:rows"], props: { maxPageCount: { type: Number, default: 0, }, + page_size: { + type: Number, + default: 10, + }, }, data() { return {}; @@ -20,7 +25,7 @@ export default { template: /*html*/ ` - + Placeholder