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 <component
:is="addIcon" :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" 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> </div>
<ListItems v-model="listItemsDlg" @attach-record="listItemsDlg = true" /> <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"> <div class="chips flex items-center img-container flex-1 hm-items flex-nowrap min-w-0 overflow-hidden">
<template v-if="cells"> <template v-if="cells">
<ItemChip v-for="(cell, i) of cells" :key="i" :item="cell.item" :value="cell.value" @unlink="unlinkRef(cell.item)" /> <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... more...
</span> </span>
</template> </template>
@ -103,12 +103,12 @@ const onAttachRecord = () => {
<div v-if="!isLocked" class="flex justify-end gap-1 min-h-[30px] items-center"> <div v-if="!isLocked" class="flex justify-end gap-1 min-h-[30px] items-center">
<MdiArrowExpand <MdiArrowExpand
class="select-none transform text-sm nc-action-icon text-gray-500/50 hover:text-gray-500 nc-arrow-expand" 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 <MdiPlus
v-if="!readOnly && isUIAllowed('xcDatatableEditable')" v-if="!readOnly && isUIAllowed('xcDatatableEditable')"
class="select-none text-sm nc-action-icon text-gray-500/50 hover:text-gray-500 nc-plus" 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> </div>
</template> </template>

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

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

Loading…
Cancel
Save