Only show validation error on parent when collapsed
This commit is contained in:
parent
bb2dcf0039
commit
a29c196733
|
@ -238,5 +238,5 @@ div.empty {
|
||||||
|
|
||||||
.validation-error {
|
.validation-error {
|
||||||
color: $warning-color;
|
color: $warning-color;
|
||||||
padding-left: $input-padding;
|
padding: 0 $input-padding;
|
||||||
}
|
}
|
||||||
|
|
|
@ -378,15 +378,16 @@
|
||||||
<div class="delimiter">[</div>
|
<div class="delimiter">[</div>
|
||||||
<button class="tag" on:click={handleExpand}>{value.length} items</button>
|
<button class="tag" on:click={handleExpand}>{value.length} items</button>
|
||||||
<div class="delimiter">]</div>
|
<div class="delimiter">]</div>
|
||||||
{/if}
|
|
||||||
{#if validationError}
|
{#if validationError}
|
||||||
<!-- FIXME: implement proper tooltip -->
|
<!-- FIXME: implement proper tooltip -->
|
||||||
<div
|
<button
|
||||||
class='validation-error'
|
class='validation-error'
|
||||||
title={validationError.isChildError ? 'Contains invalid items' : validationError.message}
|
title={validationError.isChildError ? 'Contains invalid items' : validationError.message}
|
||||||
|
on:click={handleExpand}
|
||||||
>
|
>
|
||||||
<Icon data={faExclamationTriangle} />
|
<Icon data={faExclamationTriangle} />
|
||||||
</div>
|
</button>
|
||||||
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{#if expanded}
|
{#if expanded}
|
||||||
|
@ -456,15 +457,16 @@
|
||||||
<span class="delimiter"> {</span>
|
<span class="delimiter"> {</span>
|
||||||
<button class="tag" on:click={handleExpand}>{Object.keys(value).length} props</button>
|
<button class="tag" on:click={handleExpand}>{Object.keys(value).length} props</button>
|
||||||
<span class="delimiter">}</span>
|
<span class="delimiter">}</span>
|
||||||
{/if}
|
|
||||||
{#if validationError}
|
{#if validationError}
|
||||||
<!-- FIXME: implement proper tooltip -->
|
<!-- FIXME: implement proper tooltip -->
|
||||||
<div
|
<button
|
||||||
class='validation-error'
|
class='validation-error'
|
||||||
title={validationError.isChildError ? 'Contains invalid properties' : validationError.message}
|
title={validationError.isChildError ? 'Contains invalid properties' : validationError.message}
|
||||||
|
on:click={handleExpand}
|
||||||
>
|
>
|
||||||
<Icon data={faExclamationTriangle} />
|
<Icon data={faExclamationTriangle} />
|
||||||
</div>
|
</button>
|
||||||
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{#if expanded}
|
{#if expanded}
|
||||||
|
|
Loading…
Reference in New Issue