1
0
Fork 0
mirror of synced 2024-07-11 01:06:04 +12:00

Add default value to contentLines

This commit is contained in:
Andrew Kingston 2023-04-26 12:04:41 +01:00
parent 91b2f4165d
commit c691dafc39
2 changed files with 10 additions and 2 deletions

View file

@ -12,7 +12,7 @@
export let api
export let invertX = false
export let invertY = false
export let contentLines
export let contentLines = 1
let isOpen = false
let focusedOptionIdx = null

View file

@ -29,6 +29,7 @@
export let onChange
export let invertX = false
export let invertY = false
export let contentLines = 1
const { API, dispatch } = getContext("grid")
const color = getColor(0)
@ -243,7 +244,11 @@
<div class="wrapper" class:editable class:focused style="--color:{color};">
<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}
{#if relationship.primaryDisplay}
<div class="badge">
@ -376,6 +381,9 @@
grid-row-gap: var(--cell-padding);
overflow: hidden;
padding: var(--cell-padding);
flex-wrap: nowrap;
}
.values.wrap {
flex-wrap: wrap;
}
.count {