Remove deletion notification and fix selection
This commit is contained in:
parent
adb03cefb2
commit
db13f7a2c3
|
@ -144,11 +144,11 @@
|
||||||
rows: rowsToDelete,
|
rows: rowsToDelete,
|
||||||
})
|
})
|
||||||
await fetch.refresh()
|
await fetch.refresh()
|
||||||
notificationStore.actions.success(
|
// notificationStore.actions.success(
|
||||||
`${selectedRowCount} row${
|
// `${selectedRowCount} row${
|
||||||
selectedRowCount === 1 ? "" : "s"
|
// selectedRowCount === 1 ? "" : "s"
|
||||||
} deleted successfully`
|
// } deleted successfully`
|
||||||
)
|
// )
|
||||||
|
|
||||||
// Refresh state
|
// Refresh state
|
||||||
selectedCell = null
|
selectedCell = null
|
||||||
|
@ -278,15 +278,24 @@
|
||||||
{/each}
|
{/each}
|
||||||
|
|
||||||
<!-- New row placeholder -->
|
<!-- New row placeholder -->
|
||||||
<div class="cell label new" on:click={addRow}>
|
<div
|
||||||
<Icon hoverable name="Add" />
|
class="cell label new"
|
||||||
|
on:click={addRow}
|
||||||
|
on:focus
|
||||||
|
on:mouseover={() => (hoveredRow = "new")}
|
||||||
|
class:hovered={hoveredRow === "new"}
|
||||||
|
>
|
||||||
|
<Icon hoverable name="Add" size="S" />
|
||||||
</div>
|
</div>
|
||||||
{#each fields as field, fieldIdx}
|
{#each fields as field, fieldIdx}
|
||||||
<div
|
<div
|
||||||
class="cell new"
|
class="cell new"
|
||||||
class:sticky={fieldIdx === 0}
|
class:sticky={fieldIdx === 0}
|
||||||
class:shadow={horizontallyScrolled}
|
class:shadow={horizontallyScrolled}
|
||||||
|
class:hovered={hoveredRow === "new"}
|
||||||
on:click={() => addRow(field)}
|
on:click={() => addRow(field)}
|
||||||
|
on:focus
|
||||||
|
on:mouseover={() => (hoveredRow = "new")}
|
||||||
/>
|
/>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
|
@ -374,6 +383,9 @@
|
||||||
box-shadow: inset 0 0 0 2px var(--spectrum-global-color-blue-400);
|
box-shadow: inset 0 0 0 2px var(--spectrum-global-color-blue-400);
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
.cell:not(.selected) {
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
.cell:hover {
|
.cell:hover {
|
||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue