# GdprGroup

This component exposes the group's state contained within the group prop. It also exposes the child guards that are meant to be used to render GdprGuard components.

<GdprGroup :group="g">
	<template #default="{ group, guards, toggleGroup }">
		{{ group.name }}

		<MyAwesomeSwitch
			@change="toggleGroup"
			:value="group.enabled"
			:disabled="group.required"/>

		<GdprGuard v-for="g in guards">
			<!-- [...] -->
		</GdprGuard>
	</template>
</GdprGroup>

Props

props Type Description Required Default
group GdprGuardGroupRaw (opens new window) The group to manage ✔️
recursive bool Whether or not the component tree should handle sub-groups itself true

Slot scope

Slot props Type Description
group GdprGuardGroupRaw (opens new window) allows access to the group's state
guards GdprGuardRaw[] (opens new window) access the group's guards and sub-groups
toggleGroup () => void toggle the group state and set every state to its new value
enableGroup () => void enable every guards and sub-groups
disableGroup () => void disable every guards and sub-groups
manager GdprManagerRaw (opens new window) allows access to the manager's state