diff --git a/frontend/src/lib/components/apps/components/display/AppCarouselList.svelte b/frontend/src/lib/components/apps/components/display/AppCarouselList.svelte
index 14c7aee81d..16b92c6e5c 100644
--- a/frontend/src/lib/components/apps/components/display/AppCarouselList.svelte
+++ b/frontend/src/lib/components/apps/components/display/AppCarouselList.svelte
@@ -1,5 +1,5 @@
{#each Object.keys(components['carousellistcomponent'].initialData.configuration) as key (key)}
diff --git a/frontend/src/lib/components/apps/editor/appUtils.ts b/frontend/src/lib/components/apps/editor/appUtils.ts
index c299e3341f..63b83a0237 100644
--- a/frontend/src/lib/components/apps/editor/appUtils.ts
+++ b/frontend/src/lib/components/apps/editor/appUtils.ts
@@ -1319,6 +1319,7 @@ export function isContainer(type: string): boolean {
type === 'horizontalsplitpanescomponent' ||
type === 'steppercomponent' ||
type === 'listcomponent' ||
+ type === 'carousellistcomponent' ||
type === 'decisiontreecomponent'
)
}
@@ -1336,6 +1337,9 @@ export function subGridIndexKey(type: string | undefined, id: string, world: Wor
case 'steppercomponent': {
return (world?.outputsById?.[id]?.currentStepIndex?.peak() as number) ?? 0
}
+ case 'carousellistcomponent': {
+ return (world?.outputsById?.[id]?.currentIndex?.peak() as number) ?? 0
+ }
case 'decisiontreecomponent': {
return (world?.outputsById?.[id]?.currentNodeIndex?.peak() as number) ?? 0
}
diff --git a/frontend/src/lib/components/apps/editor/componentsPanel/componentControlUtils.ts b/frontend/src/lib/components/apps/editor/componentsPanel/componentControlUtils.ts
index c8efd73813..a74198b562 100644
--- a/frontend/src/lib/components/apps/editor/componentsPanel/componentControlUtils.ts
+++ b/frontend/src/lib/components/apps/editor/componentsPanel/componentControlUtils.ts
@@ -38,7 +38,8 @@ const setValue = {
const setSelectedIndex = {
title: 'setSelectedIndex',
- description: 'Use the setSelectedIndex function to select a row in a table or an AG Grid table.',
+ description:
+ 'Use the setSelectedIndex function to select a row in a table, an AG Grid table, or navigate to a slide in a Carousel component.',
example: 'setSelectedIndex(id: string, index: number)',
documentation: 'https://www.windmill.dev/docs/apps/app-runnable-panel#setselectedindex'
}
@@ -90,6 +91,8 @@ export function getComponentControl(type: keyof typeof components): Array void) | undefined = $state(undefined)
- console.log('FOOBAR', component.type)
-
let selected = $state(
(component.type === 'plotlycomponentv2' || component.type === 'chartjscomponentv2') &&
component.datasets !== undefined