Fix selecting newly created rows
This commit is contained in:
parent
ff4c0aed46
commit
5d554d0616
|
@ -38,7 +38,7 @@
|
|||
const addRow = async () => {
|
||||
const savedRow = await rows.actions.addRow(newRow)
|
||||
if (savedRow && firstColumn) {
|
||||
$selectedCellId = `${newRow._id}-${firstColumn.name}`
|
||||
$selectedCellId = `${savedRow._id}-${firstColumn.name}`
|
||||
isAdding = false
|
||||
}
|
||||
}
|
||||
|
@ -201,15 +201,12 @@
|
|||
left: 0;
|
||||
width: 100%;
|
||||
transition: margin-bottom 130ms ease-out;
|
||||
margin-top: -1px;
|
||||
}
|
||||
.new-row.visible {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.new-row :global(.cell) {
|
||||
/*border-bottom: 0;*/
|
||||
--cell-background: var(--background) !important;
|
||||
border-top: var(--cell-border);
|
||||
}
|
||||
|
||||
.sticky-column {
|
||||
|
|
|
@ -127,7 +127,7 @@ export const createRowsStore = context => {
|
|||
const newRow = await API.saveRow({ ...row, tableId: get(tableId) })
|
||||
|
||||
// Update state
|
||||
if (idx) {
|
||||
if (idx != null) {
|
||||
rowCacheMap[newRow._id] = true
|
||||
rows.update(state => {
|
||||
state.splice(idx, 0, newRow)
|
||||
|
|
Loading…
Reference in New Issue