Browse Source

fix: key fixes

pull/9831/head
DarkPhoenix2704 2 months ago
parent
commit
f152ff1da2
  1. 2
      packages/nc-gui/components/smartsheet/calendar/DayView/DateTimeField.vue
  2. 6
      packages/nc-gui/components/smartsheet/calendar/MonthView.vue
  3. 2
      packages/nc-gui/components/smartsheet/calendar/WeekView/DateTimeField.vue

2
packages/nc-gui/components/smartsheet/calendar/DayView/DateTimeField.vue

@ -1053,7 +1053,7 @@ watch(
</div>
<div class="absolute inset-0 pointer-events-none">
<div class="relative !ml-[68px] !mr-1 nc-calendar-day-record-container" data-testid="nc-calendar-day-record-container">
<template v-for="(record, rowIndex) in recordsAcrossAllRange.record" :key="rowIndex">
<template v-for="record in recordsAcrossAllRange.record" :key="record.rowMeta.id">
<div
v-if="record.rowMeta.style?.display !== 'none'"
:data-testid="`nc-calendar-day-record-${record.row[displayField!.title!]}`"

6
packages/nc-gui/components/smartsheet/calendar/MonthView.vue

@ -857,11 +857,11 @@ const addRecord = (date: dayjs.Dayjs) => {
</div>
</div>
<div class="absolute inset-0 z-2 pointer-events-none mt-8 pb-7.5" data-testid="nc-calendar-month-record-container">
<template v-for="(record, recordIndex) in recordsToDisplay.records" :key="recordIndex">
<template v-for="record in recordsToDisplay.records" :key="record.rowMeta.id">
<div
v-if="record.rowMeta.style?.display !== 'none'"
:data-testid="`nc-calendar-month-record-${record.row[displayField!.title!]}`"
:data-unique-id="`${record.rowMeta.id}-${record.rowMeta.recordIndex}`"
:data-unique-id="`${record.rowMeta.id}`"
:style="{
...record.rowMeta.style,
zIndex: record.rowMeta.id === draggingId ? 100 : 0,
@ -891,7 +891,7 @@ const addRecord = (date: dayjs.Dayjs) => {
{{ dayjs(record.row[record.rowMeta.range?.fk_from_col!.title!]).format('h:mma').slice(0, -1) }}
</span>
</template>
<template v-for="(field, id) in fields" :key="id">
<template v-for="(field, id) in fields" :key="field.id">
<LazySmartsheetPlainCell
v-if="!isRowEmpty(record, field!)"
v-model="record.row[field!.title!]"

2
packages/nc-gui/components/smartsheet/calendar/WeekView/DateTimeField.vue

@ -993,7 +993,7 @@ watch(
</div>
<div class="absolute pointer-events-none inset-0 overflow-hidden !mt-5.95" data-testid="nc-calendar-week-record-container">
<template v-for="(record, rowIndex) in recordsAcrossAllRange.records" :key="rowIndex">
<template v-for="record in recordsAcrossAllRange.records" :key="record.rowMeta.id">
<div
v-if="record.rowMeta.style?.display !== 'none'"
:data-testid="`nc-calendar-week-record-${record.row[displayField!.title!]}`"

Loading…
Cancel
Save