fix: grid bug fixes (#10087)

* fix: links menu closing on link fix: on typing while record being saved, the typed data is overwritten from server

* fix: Infinite table Offset value '150' is invalid

* fix: failing test

* fix: grid moving on single select cell select

* fix: revert overrirde height
This commit is contained in:
Anbarasu
2024-12-20 14:58:11 +05:30
committed by GitHub
parent 2a65e3f7d2
commit 46bc5d79fb
4 changed files with 35 additions and 12 deletions

View File

@@ -725,7 +725,10 @@ export function useInfiniteData(args: {
currentRow.rowMeta.new = false
Object.assign(currentRow.row, insertedData)
Object.assign(currentRow.row, {
...(currentRow.row ?? {}),
...rowPkData(insertedData, metaValue?.columns as ColumnType[]),
})
const insertIndex = currentRow.rowMeta.rowIndex!
@@ -825,7 +828,14 @@ export function useInfiniteData(args: {
}
}
cachedRows.value.set(insertIndex, currentRow)
cachedRows.value.set(insertIndex, {
...currentRow,
rowMeta: {
...currentRow.rowMeta,
saving: false,
new: false,
},
})
if (!ignoreShifting) {
totalRows.value++
@@ -962,7 +972,12 @@ export function useInfiniteData(args: {
row.rowMeta.changed = false
await until(() => !(row.rowMeta?.new && row.rowMeta?.saving)).toMatch((v) => v)
await until(() => {
const cachedRow = cachedRows.value.get(row.rowMeta.rowIndex!)
if (!cachedRow) return true
return !cachedRow.rowMeta?.new || !cachedRow.rowMeta?.saving
}).toMatch((v) => v)
let data
if (row.rowMeta.new) {