Browse Source

refactor(gui): Remove lazy load from normal cell

Signed-off-by: Pranav C <61551451+pranavxc@users.noreply.github.com>
pull/341/head
Pranav C 3 years ago
parent
commit
dc43e4193d
  1. 2
      packages/nc-gui/components/project/spreadsheet/components/cell.vue
  2. 4
      packages/nc-gui/components/project/spreadsheet/components/editableCell.vue
  3. 6
      packages/nc-gui/components/project/spreadsheet/components/pagination.vue
  4. 11
      packages/nc-gui/components/project/spreadsheet/components/virtualCell/hasManyCell.vue

2
packages/nc-gui/components/project/spreadsheet/components/cell.vue

@ -1,5 +1,4 @@
<template>
<v-lazy>
<editable-attachment-cell
:isLocked="isLocked"
:db-alias="dbAlias"
@ -8,7 +7,6 @@
<!-- <enum-list-editable-cell @click.stop="$emit('enableedit')" v-else-if="isEnum && selected" :value="value" :column="column"></enum-list-editable-cell>-->
<enum-cell @click.stop="$emit('enableedit')" v-else-if="isEnum" :value="value" :column="column"></enum-cell>
<span v-else>{{ value }}</span>
</v-lazy>
</template>
<script>

4
packages/nc-gui/components/project/spreadsheet/components/editableCell.vue

@ -1,5 +1,4 @@
<template>
<v-lazy>
<div
@keydown.stop.left
@keydown.stop.right
@ -66,7 +65,6 @@
<text-cell v-else v-model="localState" v-on="$listeners"></text-cell>
</div>
</v-lazy>
</template>
<script>
@ -106,7 +104,7 @@ export default {
},
props: {
dbAlias: String,
value: [String, Number, Object, Boolean],
value: [String, Number, Object, Boolean,Array,Object],
meta: Object,
ignoreFocus: Boolean,
isForm: Boolean,

6
packages/nc-gui/components/project/spreadsheet/components/pagination.vue

@ -31,9 +31,9 @@
<script>
export default {
props: {
count: Number,
value: Number,
size: Number,
count: [Number, String],
value: [Number, String],
size: [Number, String],
},
data: () => ({
page: 1

11
packages/nc-gui/components/project/spreadsheet/components/virtualCell/hasManyCell.vue

@ -123,6 +123,9 @@ import listChildItemsModal
from "@/components/project/spreadsheet/components/virtualCell/components/listChildItemsModal";
import {parseIfInteger} from "@/helpers";
// todo: handling add new record for new row
export default {
name: "has-many-cell",
components: {
@ -276,9 +279,11 @@ export default {
[this.childForeignKey]: parseIfInteger(this.parentId)
};
this.expandFormModal = true;
setTimeout(() => {
this.$refs.expandedForm && this.$refs.expandedForm.$set(this.$refs.expandedForm.changedColumns, this.childForeignKey, true)
}, 500)
if (!this.isNew) {
setTimeout(() => {
this.$refs.expandedForm && this.$refs.expandedForm.$set(this.$refs.expandedForm.changedColumns, this.childForeignKey, true)
}, 500)
}
},
getCellValue(cellObj) {
if (cellObj) {

Loading…
Cancel
Save