Browse Source

fix(gui-v2): show expand/add icon even if cell is empty

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3042/head
Pranav C 2 years ago
parent
commit
dcc210e3ac
  1. 2
      packages/nc-gui-v2/components/virtual-cell/BelongsTo.vue
  2. 4
      packages/nc-gui-v2/components/virtual-cell/HasMany.vue
  3. 2
      packages/nc-gui-v2/components/virtual-cell/ManyToMany.vue

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

@ -30,7 +30,7 @@ await loadRelatedTableMeta()
<ItemChip :item="cellValue" :value="cellValue[relatedTablePrimaryValueProp]" @unlink="unlink(cellValue || localState)" /> <ItemChip :item="cellValue" :value="cellValue[relatedTablePrimaryValueProp]" @unlink="unlink(cellValue || localState)" />
</template> </template>
</div> </div>
<div class="flex-1 flex justify-end gap-1"> <div class="flex-1 flex justify-end gap-1 min-h-[30px] align-center">
<MdiExpandIcon <MdiExpandIcon
class="text-sm nc-action-icon text-gray-500/50 hover:text-gray-500 select-none group-hover:(text-gray-500)" class="text-sm nc-action-icon text-gray-500/50 hover:text-gray-500 select-none group-hover:(text-gray-500)"
@click="listItemsDlg = true" @click="listItemsDlg = true"

4
packages/nc-gui-v2/components/virtual-cell/HasMany.vue

@ -26,14 +26,14 @@ await loadRelatedTableMeta()
</script> </script>
<template> <template>
<div class="flex align-center gap-1 w-full min-full chips-wrapper"> <div class="flex align-center items-center gap-1 w-full chips-wrapper">
<div class="chips flex align-center img-container flex-grow hm-items flex-nowrap min-w-0 overflow-hidden"> <div class="chips flex align-center img-container flex-grow hm-items flex-nowrap min-w-0 overflow-hidden">
<template v-if="cellValue"> <template v-if="cellValue">
<ItemChip v-for="(ch, i) in cellValue" :key="i" :value="ch[relatedTablePrimaryValueProp]" @unlink="unlink(ch)" /> <ItemChip v-for="(ch, i) in cellValue" :key="i" :value="ch[relatedTablePrimaryValueProp]" @unlink="unlink(ch)" />
<span v-if="cellValue?.length === 10" class="caption pointer ml-1 grey--text" @click="childListDlg = true">more... </span> <span v-if="cellValue?.length === 10" class="caption pointer ml-1 grey--text" @click="childListDlg = true">more... </span>
</template> </template>
</div> </div>
<div class="flex-grow flex justify-end gap-1"> <div class="flex-grow flex justify-end gap-1 min-h-[30px] align-center">
<MdiExpandIcon <MdiExpandIcon
class="select-none transform text-sm nc-action-icon text-gray-500/50 hover:text-gray-500" class="select-none transform text-sm nc-action-icon text-gray-500/50 hover:text-gray-500"
@click="childListDlg = true" @click="childListDlg = true"

2
packages/nc-gui-v2/components/virtual-cell/ManyToMany.vue

@ -36,7 +36,7 @@ await loadRelatedTableMeta()
<span v-if="cellValue?.length === 10" class="caption pointer ml-1 grey--text" @click="childListDlg = true">more... </span> <span v-if="cellValue?.length === 10" class="caption pointer ml-1 grey--text" @click="childListDlg = true">more... </span>
</template> </template>
</div> </div>
<div class="flex-1 flex justify-end gap-1"> <div class="flex-1 flex justify-end gap-1 min-h-[30px] align-center">
<MdiExpandIcon class="text-sm nc-action-icon text-gray-500/50 hover:text-gray-500" @click="childListDlg = true" /> <MdiExpandIcon class="text-sm nc-action-icon text-gray-500/50 hover:text-gray-500" @click="childListDlg = true" />
<MdiPlusIcon class="text-sm nc-action-icon text-gray-500/50 hover:text-gray-500" @click="listItemsDlg = true" /> <MdiPlusIcon class="text-sm nc-action-icon text-gray-500/50 hover:text-gray-500" @click="listItemsDlg = true" />
</div> </div>

Loading…
Cancel
Save