Browse Source

feat(nc-gui): prevent event bubbling on kanban cards

pull/3818/head
Wing-Kam Wong 2 years ago
parent
commit
67033bb126
  1. 2
      packages/nc-gui/components/virtual-cell/BelongsTo.vue
  2. 6
      packages/nc-gui/components/virtual-cell/HasMany.vue
  3. 6
      packages/nc-gui/components/virtual-cell/ManyToMany.vue

2
packages/nc-gui/components/virtual-cell/BelongsTo.vue

@ -87,7 +87,7 @@ const unlinkRef = async (rec: Record<string, any>) => {
<component
:is="addIcon"
class="text-sm nc-action-icon text-gray-500/50 hover:text-gray-500 select-none group-hover:(text-gray-500) nc-plus"
@click="listItemsDlg = true"
@click.stop="listItemsDlg = true"
/>
</div>
<ListItems v-model="listItemsDlg" @attach-record="listItemsDlg = true" />

6
packages/nc-gui/components/virtual-cell/HasMany.vue

@ -95,7 +95,7 @@ const onAttachRecord = () => {
<div class="chips flex items-center img-container flex-1 hm-items flex-nowrap min-w-0 overflow-hidden">
<template v-if="cells">
<ItemChip v-for="(cell, i) of cells" :key="i" :item="cell.item" :value="cell.value" @unlink="unlinkRef(cell.item)" />
<span v-if="cellValue?.length === 10" class="caption pointer ml-1 grey--text" @click="childListDlg = true">
<span v-if="cellValue?.length === 10" class="caption pointer ml-1 grey--text" @click.stop="childListDlg = true">
more...
</span>
</template>
@ -103,12 +103,12 @@ const onAttachRecord = () => {
<div v-if="!isLocked" class="flex justify-end gap-1 min-h-[30px] items-center">
<MdiArrowExpand
class="select-none transform text-sm nc-action-icon text-gray-500/50 hover:text-gray-500 nc-arrow-expand"
@click="childListDlg = true"
@click.stop="childListDlg = true"
/>
<MdiPlus
v-if="!readOnly && isUIAllowed('xcDatatableEditable')"
class="select-none text-sm nc-action-icon text-gray-500/50 hover:text-gray-500 nc-plus"
@click="listItemsDlg = true"
@click.stop="listItemsDlg = true"
/>
</div>
</template>

6
packages/nc-gui/components/virtual-cell/ManyToMany.vue

@ -95,20 +95,20 @@ const onAttachRecord = () => {
<template v-if="cells">
<ItemChip v-for="(cell, i) of cells" :key="i" :item="cell.item" :value="cell.value" @unlink="unlinkRef(cell.item)" />
<span v-if="cells?.length === 10" class="caption pointer ml-1 grey--text" @click="childListDlg = true">more... </span>
<span v-if="cells?.length === 10" class="caption pointer ml-1 grey--text" @click.stop="childListDlg = true">more... </span>
</template>
</div>
<div v-if="!isLocked" class="flex justify-end gap-1 min-h-[30px] items-center">
<MdiArrowExpand
class="text-sm nc-action-icon text-gray-500/50 hover:text-gray-500 nc-arrow-expand"
@click="childListDlg = true"
@click.stop="childListDlg = true"
/>
<MdiPlus
v-if="!readOnly && isUIAllowed('xcDatatableEditable')"
class="text-sm nc-action-icon text-gray-500/50 hover:text-gray-500 nc-plus"
@click="listItemsDlg = true"
@click.stop="listItemsDlg = true"
/>
</div>
</template>

Loading…
Cancel
Save