Add ignoreKeys property to JsonEditor
This commit is contained in:
parent
9a5ccf1602
commit
7e74aa2c3b
@ -12,12 +12,14 @@
|
||||
>
|
||||
<JsonArray v-if="Array.isArray(row)"
|
||||
:value="row"
|
||||
:ignoreKeys="ignoreKeys"
|
||||
@change="changeItem(rowKey, $event)"
|
||||
>
|
||||
</JsonArray>
|
||||
<JsonObject v-else-if="typeof row === 'object' && row !== null"
|
||||
:value="row"
|
||||
:label="rowKey"
|
||||
:ignoreKeys="ignoreKeys"
|
||||
@change="changeItem(rowKey, $event)"
|
||||
>
|
||||
</JsonObject>
|
||||
@ -41,6 +43,7 @@ export default {
|
||||
props: [
|
||||
'value',
|
||||
'expanded',
|
||||
'ignoreKeys', // this prop is passthrough for JsonArray
|
||||
],
|
||||
components: {
|
||||
JsonObject,
|
||||
|
@ -16,24 +16,27 @@
|
||||
<div v-for="(row, rowKey) of value_internal"
|
||||
:key="rowKey"
|
||||
>
|
||||
<JsonArray v-if="Array.isArray(row)"
|
||||
:value="row"
|
||||
@change="changeItem(rowKey, $event)"
|
||||
>
|
||||
</JsonArray>
|
||||
<JsonObject v-else-if="typeof row === 'object' && row !== null"
|
||||
<template v-if="(ignoreKeys || {})[rowKey] !== true">
|
||||
<JsonArray v-if="Array.isArray(row)"
|
||||
:value="row"
|
||||
:label="rowKey"
|
||||
:ignoreKeys="(ignoreKeys || {})[rowKey]"
|
||||
@change="changeItem(rowKey, $event)"
|
||||
>
|
||||
</JsonObject>
|
||||
<JsonElement v-else
|
||||
:value="row"
|
||||
:label="rowKey"
|
||||
@change="changeItem(rowKey, $event)"
|
||||
>
|
||||
</JsonElement>
|
||||
|
||||
>
|
||||
</JsonArray>
|
||||
<JsonObject v-else-if="typeof row === 'object' && row !== null"
|
||||
:value="row"
|
||||
:label="rowKey"
|
||||
:ignoreKeys="(ignoreKeys || {})[rowKey]"
|
||||
@change="changeItem(rowKey, $event)"
|
||||
>
|
||||
</JsonObject>
|
||||
<JsonElement v-else
|
||||
:value="row"
|
||||
:label="rowKey"
|
||||
@change="changeItem(rowKey, $event)"
|
||||
>
|
||||
</JsonElement>
|
||||
</template>
|
||||
</div>
|
||||
<div><b>},</b></div>
|
||||
</template>
|
||||
@ -50,6 +53,7 @@ export default {
|
||||
'value',
|
||||
'label',
|
||||
'expanded',
|
||||
'ignoreKeys',
|
||||
],
|
||||
components: {
|
||||
JsonArray,
|
||||
|
Loading…
Reference in New Issue
Block a user