Browse Source

fix: hide dropdown styling in public shared grid view

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/688/head
Pranav C 3 years ago
parent
commit
20a10cb8b7
  1. 4
      packages/nc-gui/components/project/spreadsheet/components/editableCell.vue
  2. 5
      packages/nc-gui/components/project/spreadsheet/views/xcGridView.vue

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

@ -59,7 +59,7 @@
/>
<enum-cell
v-else-if="isEnum && !isForm && !active"
v-else-if="isEnum && (( !isForm && !active) || isLocked || (isPublic && !isForm))"
v-model="localState"
:column="column"
v-on="parentListeners"
@ -81,7 +81,7 @@
/>
<set-list-editable-cell
v-else-if="isSet && (active || isForm)"
v-else-if="isSet && (active || isForm) && !isLocked && !(isPublic && !isForm)"
v-model="localState"
:column="column"
v-on="parentListeners"

5
packages/nc-gui/components/project/spreadsheet/views/xcGridView.vue

@ -346,6 +346,8 @@ export default {
},
methods: {
isRequired(_columnObj, rowObj) {
if (this.isPublicView) { return false }
let columnObj = _columnObj
if (columnObj.bt) {
columnObj = this.meta.columns.find(c => c.cn === columnObj.bt.cn)
@ -504,13 +506,14 @@ export default {
}
},
enableEditable(column) {
return (column && column.uidt === 'Attachment') ||
return ((column && column.uidt === 'Attachment') ||
(column && column.uidt === 'SingleSelect') ||
(column && column.uidt === 'MultiSelect') ||
(column && column.uidt === 'DateTime') ||
(column && column.uidt === 'Date') ||
(column && column.uidt === 'Time') ||
(this.sqlUi && this.sqlUi.getAbstractType(column) === 'boolean')
)
},
insertNewRow(atEnd = false, expand = false) {
this.$emit('insertNewRow', atEnd, expand)

Loading…
Cancel
Save