This commit is contained in:
Jan Prochazka
2022-09-18 18:43:06 +02:00
parent 1a716f0bce
commit a98a4617ae

View File

@@ -48,6 +48,15 @@
$: isJson = _.isPlainObject(value) && !(value?.type == 'Buffer' && _.isArray(value.data)) && !value.$oid;
$: jsonParsedValue = isJsonLikeLongString(value) ? safeJsonParse(value) : null;
function shouldShowTextModalButton(col) {
const m = col?.dataType?.match(/.*char.*\(([^\)]+)\)/);
if (m && m[1]) {
return parseInt(m[1]) >= 30 || m[1]?.toUpperCase() == 'MAX';
}
return false;
}
</script>
<td
@@ -114,6 +123,10 @@
/>
{/if}
<!-- {#if shouldShowTextModalButton(col)}
<ShowFormButton icon="icon edit" on:click={() => openJsonDocument(value, undefined, true)} />
{/if} -->
{#if isAutoFillMarker}
<div class="autoFillMarker autofillHandleMarker" />
{/if}