From 26e9b5d298073e1956855c0381034621575ee215 Mon Sep 17 00:00:00 2001 From: Mentalflow <312902918@qq.com> Date: Tue, 9 May 2023 10:57:11 +0800 Subject: [PATCH] Let the pagination can be manually adjusted in FluTableView. --- src/imports/FluentUI/Controls/FluTableView.qml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/imports/FluentUI/Controls/FluTableView.qml b/src/imports/FluentUI/Controls/FluTableView.qml index 82174b22..add8f91c 100644 --- a/src/imports/FluentUI/Controls/FluTableView.qml +++ b/src/imports/FluentUI/Controls/FluTableView.qml @@ -118,6 +118,7 @@ Item { id:pagination height: 40 pageCurrent: control.pageCurrent + onPageCurrentChanged: control.pageCurrent = pageCurrent itemCount: control.itemCount pageCount: control.pageCount onRequestPage: @@ -128,6 +129,15 @@ Item { top: parent.top right: parent.right } + Connections{ + target: control + function onPageCurrentChanged(){ + if (control.pageCurrent!==pagination.pageCurrent) + { + pagination.calcNewPage(control.pageCurrent) + } + } + } } } model:model_data_source