Skip to content

Commit

Permalink
fix(NcColorPicker): Allow to submit selected color in simple-view
Browse files Browse the repository at this point in the history
Also show the `Choose` button for the simple select view to allow triggering the `submit` event.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
  • Loading branch information
susnux committed Apr 16, 2024
1 parent b1c7a47 commit 1533ef2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/components/NcColorPicker/NcColorPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default {
<template>
<div class="container1">
<NcButton @click="open = !open"> Click Me </NcButton>
<NcColorPicker :value="color" @input="updateColor" :shown.sync="open" v-slot="{ attrs }">
<NcColorPicker :value="color" @input="updateColor" :shown.sync="open" @submit="open = false" v-slot="{ attrs }">
<div v-bind="attrs" :style="{'background-color': color}" class="color1" />
</NcColorPicker>
</div>
Expand Down Expand Up @@ -205,16 +205,15 @@ export default {
<ArrowLeft :size="20" />
</template>
</NcButton>
<NcButton v-if="!advanced"
<NcButton v-else
type="tertiary"
:aria-label="ariaMore"
@click="handleMoreSettings">
<template #icon>
<DotsHorizontal :size="20" />
</template>
</NcButton>
<NcButton v-if="advanced"
type="primary"
<NcButton type="primary"
@click="handleConfirm">
{{ t('Choose') }}
</NcButton>
Expand Down

0 comments on commit 1533ef2

Please sign in to comment.