Browse Source

geodata: address PR feedback (WIP)

pull/4749/head
flisowna 2 years ago
parent
commit
cdc233c5b8
  1. 24
      packages/nc-gui/components/smartsheet/toolbar/MappedBy.vue

24
packages/nc-gui/components/smartsheet/toolbar/MappedBy.vue

@ -29,8 +29,6 @@ const { fields, loadViewColumns, metaColumnById } = useViewColumns(activeView, m
const { loadMapData, loadMapMeta, updateMapMeta, mapMetaData, geoDataFieldColumn } = useMapViewStoreOrThrow() const { loadMapData, loadMapMeta, updateMapMeta, mapMetaData, geoDataFieldColumn } = useMapViewStoreOrThrow()
const stackedByDropdown = ref(false)
watch( watch(
() => activeView.value?.id, () => activeView.value?.id,
async (newVal, oldVal) => { async (newVal, oldVal) => {
@ -66,24 +64,12 @@ const geoDataFieldOptions = computed<SelectProps['options']>(() => {
}) })
}) })
const handleChange = () => {
stackedByDropdown.value = false
}
</script> </script>
<template> <template>
<a-dropdown <a-dropdown v-if="!IsPublic" :trigger="['click']">
v-if="!IsPublic" <div>
v-model:visible="stackedByDropdown" <a-button class="nc-toolbar-btn" :disabled="isLocked">
:trigger="['click']"
overlay-class-name="nc-dropdown-kanban-stacked-by-menu"
>
<div class="nc-kanban-btn">
<a-button
v-e="['c:kanban:change-grouping-field']"
class="nc-kanban-stacked-by-menu-btn nc-toolbar-btn"
:disabled="isLocked"
>
<div class="flex items-center gap-1"> <div class="flex items-center gap-1">
<mdi-arrow-down-drop-circle-outline /> <mdi-arrow-down-drop-circle-outline />
<span class="text-capitalize !text-sm font-weight-normal"> <span class="text-capitalize !text-sm font-weight-normal">
@ -96,7 +82,6 @@ const handleChange = () => {
</div> </div>
<template #overlay> <template #overlay>
<div <div
v-if="stackedByDropdown"
class="p-3 min-w-[280px] bg-gray-50 shadow-lg nc-table-toolbar-menu max-h-[max(80vh,500px)] overflow-auto !border" class="p-3 min-w-[280px] bg-gray-50 shadow-lg nc-table-toolbar-menu max-h-[max(80vh,500px)] overflow-auto !border"
@click.stop @click.stop
> >
@ -108,10 +93,9 @@ const handleChange = () => {
<div class="grouping-field"> <div class="grouping-field">
<a-select <a-select
v-model:value="geoDataMappingFieldColumnId" v-model:value="geoDataMappingFieldColumnId"
class="w-full nc-kanban-grouping-field-select" class="w-full"
:options="geoDataFieldOptions" :options="geoDataFieldOptions"
placeholder="Select a Mapping Field" placeholder="Select a Mapping Field"
@change="handleChange"
@click.stop @click.stop
/> />
</div> </div>

Loading…
Cancel
Save