Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(NcColorPicker): define a container prop #5172

Merged
merged 1 commit into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/components/NcColorPicker/NcColorPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ export default {

<template>
<NcPopover popup-role="dialog"
:container="container"
v-bind="$attrs"
v-on="$listeners"
@apply-hide="handleClose">
Expand All @@ -187,7 +188,7 @@ export default {
@click="pickColor(color)">
</label>
</div>
<Chrome v-if="advanced"
<Chrome v-else
v-model="currentColor"
class="color-picker__advanced"
:disable-alpha="true"
Expand Down Expand Up @@ -290,6 +291,14 @@ export default {
|| (typeof item === 'object' && item.color && HEX_REGEX.test(item.color)),
),
},

/**
* Selector for the popover container
*/
container: {
type: [String, Object, Element, Boolean],
default: 'body',
},
},

emits: [
Expand Down
1 change: 1 addition & 0 deletions src/components/NcEmojiPicker/NcEmojiPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ This component allows the user to pick an emoji.
@trailing-button-click="clearSearch(); slotProps.onSearch(search);"
@update:value="slotProps.onSearch(search)" />
<NcColorPicker palette-only
:container="container"
:palette="skinTonePalette"
:value="currentColor.color"
@update:value="onChangeSkinTone">
Expand Down