diff --git a/src/lib/KratosForm.svelte b/src/lib/KratosForm.svelte index 474dff5..6008566 100644 --- a/src/lib/KratosForm.svelte +++ b/src/lib/KratosForm.svelte @@ -9,10 +9,21 @@ isUiNodeImageAttributes, isUiNodeInputAttributes, isUiNodeScriptAttributes, - isUiNodeTextAttributes + isUiNodeTextAttributes, + filterNodesByGroups } from '@ory/integrations/ui'; export let ui: UiContainer; + + let groups = [ + ...new Set(ui.nodes.map((node) => node.group).filter((group) => group != 'default')) + ]; + export let grouped_nodes = groups.map((group) => + filterNodesByGroups({ + nodes: ui.nodes, + groups: group + }) + ); {#if ui.messages} @@ -48,38 +59,68 @@ {/each} {/if} -
+ {/each} + +{/each}