Browse Source

enhancement: show scrollbar in fields menu

re #2181

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/2183/head
Pranav C 2 years ago
parent
commit
eabe37c6a6
  1. 100
      packages/nc-gui/components/project/spreadsheet/components/FieldsMenu.vue

100
packages/nc-gui/components/project/spreadsheet/components/FieldsMenu.vue

@ -96,53 +96,57 @@
</template>--> </template>-->
</v-text-field> </v-text-field>
</v-list-item> </v-list-item>
<draggable <div
v-model="fields" class="nc-fields-list py-1"
@start="drag = true"
@end="drag = false"
@change="onMove($event)"
> >
<template v-for="(field, i) in fields"> <draggable
<v-list-item v-model="fields"
v-show=" @start="drag = true"
(!fieldFilter || @end="drag = false"
(field.title || '') @change="onMove($event)"
.toLowerCase() >
.includes(fieldFilter.toLowerCase())) && <template v-for="(field, i) in fields">
!( <v-list-item
!showSystemFieldsLoc && v-show="
systemColumnsIds.includes(field.fk_column_id) (!fieldFilter ||
) (field.title || '')
" .toLowerCase()
:key="field.id" .includes(fieldFilter.toLowerCase())) &&
dense !(
> !showSystemFieldsLoc &&
<v-checkbox systemColumnsIds.includes(field.fk_column_id)
v-model="field.show" )
class="mt-0 pt-0" "
:key="field.id"
dense dense
hide-details
@click.stop
@change="saveOrUpdate(field, i)"
>
<template #label>
<v-icon small class="mr-1">
{{ field.icon }}
</v-icon>
<span class="caption">{{ field.title }}</span>
</template>
</v-checkbox>
<v-spacer />
<v-icon
small
color="grey"
:class="`align-self-center drag-icon nc-child-draggable-icon-${field}`"
> >
mdi-drag <v-checkbox
</v-icon> v-model="field.show"
</v-list-item> class="mt-0 pt-0"
</template> dense
</draggable> hide-details
@click.stop
@change="saveOrUpdate(field, i)"
>
<template #label>
<v-icon small class="mr-1">
{{ field.icon }}
</v-icon>
<span class="caption">{{ field.title }}</span>
</template>
</v-checkbox>
<v-spacer />
<v-icon
small
color="grey"
:class="`align-self-center drag-icon nc-child-draggable-icon-${field}`"
>
mdi-drag
</v-icon>
</v-list-item>
</template>
</draggable>
</div>
<v-divider class="my-2" /> <v-divider class="my-2" />
<v-list-item v-if="!isPublic" dense> <v-list-item v-if="!isPublic" dense>
@ -459,7 +463,7 @@ export default {
'order', 'order',
(this.fields[event.moved.newIndex - 1].order + (this.fields[event.moved.newIndex - 1].order +
this.fields[event.moved.newIndex + 1].order) / this.fields[event.moved.newIndex + 1].order) /
2 2
) )
} }
this.saveOrUpdate( this.saveOrUpdate(
@ -504,4 +508,10 @@ export default {
.drag-icon { .drag-icon {
cursor: all-scroll; /*cursor: grab;*/ cursor: all-scroll; /*cursor: grab;*/
} }
.nc-fields-list {
height: auto;
max-height: 500px;
overflow-y: auto;
}
</style> </style>

Loading…
Cancel
Save