Skip to content

Commit 234cb0e

Browse files
committed
feat(NcChip): allow to define the actions container
If the component is used within a container this allow to also limit the actions popover to that container. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent 613b0bc commit 234cb0e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/components/NcChip/NcChip.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ export default {
9191
</span>
9292
<NcActions v-if="canClose || hasActions()"
9393
class="nc-chip__actions"
94+
:container="actionsContainer"
9495
:force-menu="!canClose"
9596
variant="tertiary-no-background">
9697
<NcActionButton v-if="canClose"
@@ -123,6 +124,11 @@ const props = withDefaults(defineProps<{
123124
*/
124125
ariaLabelClose?: string
125126
127+
/**
128+
* Container for the actions
129+
*/
130+
actionsContainer?: string
131+
126132
/**
127133
* Main text of the chip.
128134
*/
@@ -154,6 +160,7 @@ const props = withDefaults(defineProps<{
154160
variant: 'primary' | 'secondary' | 'tertiary'
155161
}>(), {
156162
ariaLabelClose: t('Close'),
163+
actionsContainer: 'body',
157164
iconPath: undefined,
158165
iconSvg: undefined,
159166
text: '',

0 commit comments

Comments
 (0)