Browse Source

geodata: address PR feedback (WIP)

pull/4749/head
flisowna 2 years ago
parent
commit
6676126fea
  1. 9
      packages/nc-gui/composables/useMapViewDataStore.ts

9
packages/nc-gui/composables/useMapViewDataStore.ts

@ -6,7 +6,7 @@ import type { Row } from '~/lib'
export const geodataToggleState = reactive({ show: false }) export const geodataToggleState = reactive({ show: false })
const formatData = (list: Row[]) => const formatData = (list: Record<string, any>[]) =>
list.map((row) => ({ list.map((row) => ({
row: { ...row }, row: { ...row },
oldRow: { ...row }, oldRow: { ...row },
@ -43,12 +43,12 @@ const [useProvideMapViewStore, useMapViewStore] = useInjectionState(
const geoDataFieldColumn = ref<ColumnType | undefined>() const geoDataFieldColumn = ref<ColumnType | undefined>()
const appInfoDefaultLimit = 1000 const defaultPageSize = 1000
const paginationData = ref<PaginatedType>({ page: 1, pageSize: appInfoDefaultLimit }) const paginationData = ref<PaginatedType>({ page: 1, pageSize: defaultPageSize })
const queryParams = computed(() => ({ const queryParams = computed(() => ({
limit: paginationData.value.pageSize ?? appInfoDefaultLimit, limit: paginationData.value.pageSize ?? defaultPageSize,
where: where?.value ?? '', where: where?.value ?? '',
})) }))
@ -97,7 +97,6 @@ const [useProvideMapViewStore, useMapViewStore] = useInjectionState(
async function insertRow( async function insertRow(
currentRow: Row, currentRow: Row,
_rowIndex = formattedData.value?.length,
ltarState: Record<string, any> = {}, ltarState: Record<string, any> = {},
{ {
metaValue = meta.value, metaValue = meta.value,

Loading…
Cancel
Save