From b6e8d2f21e05e2b27411cc32f54a983ebe2fbb02 Mon Sep 17 00:00:00 2001 From: jgeorgi Date: Tue, 11 Jul 2023 22:01:18 -0700 Subject: [PATCH 1/3] Add cacheSource repeater property Signed-off-by: jgeorgi --- .../doc/components/oh-repeater.md | 5 ++ .../definitions/widgets/system/repeater.js | 3 +- .../components/widgets/system/oh-repeater.vue | 58 +++++++------------ 3 files changed, 27 insertions(+), 39 deletions(-) diff --git a/bundles/org.openhab.ui/doc/components/oh-repeater.md b/bundles/org.openhab.ui/doc/components/oh-repeater.md index 7a406f122a..4db3e1d35a 100644 --- a/bundles/org.openhab.ui/doc/components/oh-repeater.md +++ b/bundles/org.openhab.ui/doc/components/oh-repeater.md @@ -122,6 +122,11 @@ Iterate over an array and repeat the children components in the default slot Render all children directly under the repeater's parent, without any container + + + The source array will be cached and not refreshed on page updates + + diff --git a/bundles/org.openhab.ui/web/src/assets/definitions/widgets/system/repeater.js b/bundles/org.openhab.ui/web/src/assets/definitions/widgets/system/repeater.js index 8d650f5282..6715a59768 100644 --- a/bundles/org.openhab.ui/web/src/assets/definitions/widgets/system/repeater.js +++ b/bundles/org.openhab.ui/web/src/assets/definitions/widgets/system/repeater.js @@ -27,5 +27,6 @@ export default () => [ pb('listContainer', 'List container', 'The child components will be wrapped in a ul HTML elements instead of a div'), pt('containerClasses', 'Classes of the container', 'Add these CSS classes to the container'), pt('containerStyle', 'Styles of the container', 'Add these CSS styles to the container'), - pb('fragment', 'No container (fragment)', 'Render all children directly under the repeater\'s parent, without any container') + pb('fragment', 'No container (fragment)', 'Render all children directly under the repeater\'s parent, without any container'), + pb('cacheSource', 'Suppress source refresh', 'The source array will be cached and not refreshed on page updates') ] diff --git a/bundles/org.openhab.ui/web/src/components/widgets/system/oh-repeater.vue b/bundles/org.openhab.ui/web/src/components/widgets/system/oh-repeater.vue index 4997292258..97e94c394a 100644 --- a/bundles/org.openhab.ui/web/src/components/widgets/system/oh-repeater.vue +++ b/bundles/org.openhab.ui/web/src/components/widgets/system/oh-repeater.vue @@ -1,4 +1,4 @@ -