Add default value to contentLines
This commit is contained in:
parent
91b2f4165d
commit
c691dafc39
|
@ -12,7 +12,7 @@
|
||||||
export let api
|
export let api
|
||||||
export let invertX = false
|
export let invertX = false
|
||||||
export let invertY = false
|
export let invertY = false
|
||||||
export let contentLines
|
export let contentLines = 1
|
||||||
|
|
||||||
let isOpen = false
|
let isOpen = false
|
||||||
let focusedOptionIdx = null
|
let focusedOptionIdx = null
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
export let onChange
|
export let onChange
|
||||||
export let invertX = false
|
export let invertX = false
|
||||||
export let invertY = false
|
export let invertY = false
|
||||||
|
export let contentLines = 1
|
||||||
|
|
||||||
const { API, dispatch } = getContext("grid")
|
const { API, dispatch } = getContext("grid")
|
||||||
const color = getColor(0)
|
const color = getColor(0)
|
||||||
|
@ -243,7 +244,11 @@
|
||||||
|
|
||||||
<div class="wrapper" class:editable class:focused style="--color:{color};">
|
<div class="wrapper" class:editable class:focused style="--color:{color};">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="values" on:wheel={e => (focused ? e.stopPropagation() : null)}>
|
<div
|
||||||
|
class="values"
|
||||||
|
class:wrap={editable || contentLines > 1}
|
||||||
|
on:wheel={e => (focused ? e.stopPropagation() : null)}
|
||||||
|
>
|
||||||
{#each value || [] as relationship, idx}
|
{#each value || [] as relationship, idx}
|
||||||
{#if relationship.primaryDisplay}
|
{#if relationship.primaryDisplay}
|
||||||
<div class="badge">
|
<div class="badge">
|
||||||
|
@ -376,6 +381,9 @@
|
||||||
grid-row-gap: var(--cell-padding);
|
grid-row-gap: var(--cell-padding);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: var(--cell-padding);
|
padding: var(--cell-padding);
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
}
|
||||||
|
.values.wrap {
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
.count {
|
.count {
|
||||||
|
|
Loading…
Reference in New Issue