schema-based-json-editor
Advanced tools
Comparing version 3.6.1 to 3.6.2
@@ -76,3 +76,3 @@ "use strict"; | ||
if (this.hasDeleteButton) { | ||
return common.getTitle(common.findTitle(this.value), this.title, this.schema.title); | ||
return common.getTitle(common.findTitle(this.value, this.properties), this.title, this.schema.title); | ||
} | ||
@@ -79,0 +79,0 @@ return common.getTitle(this.title, this.schema.title); |
@@ -164,3 +164,6 @@ /// <reference types="react" /> | ||
[name: string]: ValueType; | ||
} | undefined): string | undefined; | ||
} | undefined, properties: { | ||
name: string; | ||
value: Schema; | ||
}[]): string | undefined; | ||
export declare function getTitle(...titles: any[]): string; | ||
@@ -167,0 +170,0 @@ export declare function compare(a: { |
@@ -535,6 +535,7 @@ "use strict"; | ||
exports.initializeMarkdown = initializeMarkdown; | ||
function findTitle(value) { | ||
function findTitle(value, properties) { | ||
if (value) { | ||
for (var key in value) { | ||
var title = value[key]; | ||
for (var _i = 0, properties_1 = properties; _i < properties_1.length; _i++) { | ||
var property = properties_1[_i].name; | ||
var title = value[property]; | ||
if (typeof title === "string" && title.length > 0) { | ||
@@ -541,0 +542,0 @@ if (title.length > 23) { |
@@ -115,3 +115,3 @@ "use strict"; | ||
if (this.props.onDelete) { | ||
return common.getTitle(common.findTitle(this.value), this.props.title, this.props.schema.title); | ||
return common.getTitle(common.findTitle(this.value, this.properties), this.props.title, this.props.schema.title); | ||
} | ||
@@ -118,0 +118,0 @@ return common.getTitle(this.props.title, this.props.schema.title); |
@@ -54,3 +54,3 @@ "use strict"; | ||
if (this.hasDeleteButton) { | ||
return common.getTitle(common.findTitle(this.value), this.title, this.schema.title); | ||
return common.getTitle(common.findTitle(this.value, this.properties), this.title, this.schema.title); | ||
} | ||
@@ -57,0 +57,0 @@ return common.getTitle(this.title, this.schema.title); |
{ | ||
"name": "schema-based-json-editor", | ||
"version": "3.6.1", | ||
"version": "3.6.2", | ||
"description": "A reactjs, angular2 and vuejs component of schema based json editor.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
298934
4224