Use different background colour for readonly cells
This commit is contained in:
parent
b44e6ddea6
commit
aa98cf72f5
|
@ -67,6 +67,7 @@
|
||||||
{rowIdx}
|
{rowIdx}
|
||||||
{focused}
|
{focused}
|
||||||
{selectedUser}
|
{selectedUser}
|
||||||
|
{readonly}
|
||||||
error={$error}
|
error={$error}
|
||||||
on:click={() => focusedCellId.set(cellId)}
|
on:click={() => focusedCellId.set(cellId)}
|
||||||
on:contextmenu={e => menu.actions.open(cellId, e)}
|
on:contextmenu={e => menu.actions.open(cellId, e)}
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
export let rowIdx
|
export let rowIdx
|
||||||
export let defaultHeight = false
|
export let defaultHeight = false
|
||||||
export let center = false
|
export let center = false
|
||||||
|
export let readonly = false
|
||||||
|
|
||||||
$: style = getStyle(width, selectedUser)
|
$: style = getStyle(width, selectedUser)
|
||||||
|
|
||||||
|
@ -27,6 +28,7 @@
|
||||||
class:focused
|
class:focused
|
||||||
class:error
|
class:error
|
||||||
class:center
|
class:center
|
||||||
|
class:readonly
|
||||||
class:default-height={defaultHeight}
|
class:default-height={defaultHeight}
|
||||||
class:selected-other={selectedUser != null}
|
class:selected-other={selectedUser != null}
|
||||||
on:focus
|
on:focus
|
||||||
|
@ -121,7 +123,8 @@
|
||||||
.cell:hover {
|
.cell:hover {
|
||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
.cell.highlighted:not(.focused) {
|
.cell.highlighted:not(.focused),
|
||||||
|
.cell.focused.readonly {
|
||||||
--cell-background: var(--cell-background-hover);
|
--cell-background: var(--cell-background-hover);
|
||||||
}
|
}
|
||||||
.cell.selected:not(.focused) {
|
.cell.selected:not(.focused) {
|
||||||
|
|
Loading…
Reference in New Issue