Browse Source

feat: scroll for select options

Re #3854

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/4063/head
mertmit 2 years ago
parent
commit
08a468fe57
  1. 7
      packages/nc-gui/components/smartsheet/column/SelectOptions.vue

7
packages/nc-gui/components/smartsheet/column/SelectOptions.vue

@ -129,6 +129,7 @@ watch(inputs, () => {
<template> <template>
<div class="w-full"> <div class="w-full">
<div class="max-h-[250px] overflow-x-auto pr-1">
<Draggable :list="options" item-key="id" handle=".nc-child-draggable-icon"> <Draggable :list="options" item-key="id" handle=".nc-child-draggable-icon">
<template #item="{ element, index }"> <template #item="{ element, index }">
<div class="flex py-1 items-center nc-select-option"> <div class="flex py-1 items-center nc-select-option">
@ -157,14 +158,14 @@ watch(inputs, () => {
<div v-if="validateInfos?.['colOptions.options']?.help?.[0]?.[0]" class="text-error text-[10px] my-2"> <div v-if="validateInfos?.['colOptions.options']?.help?.[0]?.[0]" class="text-error text-[10px] my-2">
{{ validateInfos['colOptions.options'].help[0][0] }} {{ validateInfos['colOptions.options'].help[0][0] }}
</div> </div>
</template>
</Draggable>
</div>
<a-button type="dashed" class="w-full caption mt-2" @click="addNewOption()"> <a-button type="dashed" class="w-full caption mt-2" @click="addNewOption()">
<div class="flex items-center"> <div class="flex items-center">
<MdiPlus /> <MdiPlus />
<span class="flex-auto">Add option</span> <span class="flex-auto">Add option</span>
</div> </div>
</a-button> </a-button>
</template>
</Draggable>
</div> </div>
</template> </template>

Loading…
Cancel
Save