Skip to content

Commit 1533ef2

Browse files
committed
fix(NcColorPicker): Allow to submit selected color in simple-view
Also show the `Choose` button for the simple select view to allow triggering the `submit` event. Signed-off-by: Ferdinand Thiessen <[email protected]>
1 parent b1c7a47 commit 1533ef2

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/components/NcColorPicker/NcColorPicker.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export default {
8989
<template>
9090
<div class="container1">
9191
<NcButton @click="open = !open"> Click Me </NcButton>
92-
<NcColorPicker :value="color" @input="updateColor" :shown.sync="open" v-slot="{ attrs }">
92+
<NcColorPicker :value="color" @input="updateColor" :shown.sync="open" @submit="open = false" v-slot="{ attrs }">
9393
<div v-bind="attrs" :style="{'background-color': color}" class="color1" />
9494
</NcColorPicker>
9595
</div>
@@ -205,16 +205,15 @@ export default {
205205
<ArrowLeft :size="20" />
206206
</template>
207207
</NcButton>
208-
<NcButton v-if="!advanced"
208+
<NcButton v-else
209209
type="tertiary"
210210
:aria-label="ariaMore"
211211
@click="handleMoreSettings">
212212
<template #icon>
213213
<DotsHorizontal :size="20" />
214214
</template>
215215
</NcButton>
216-
<NcButton v-if="advanced"
217-
type="primary"
216+
<NcButton type="primary"
218217
@click="handleConfirm">
219218
{{ t('Choose') }}
220219
</NcButton>

0 commit comments

Comments
 (0)