Skip to content
This repository was archived by the owner on May 14, 2020. It is now read-only.

Commit f621ce8

Browse files
committed
change getItemString signature
1 parent c5c58f8 commit f621ce8

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/JSONArrayNode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export default class JSONArrayNode extends React.Component {
7878
if (!this.itemString) {
7979
this.itemString = this.props.data.length + ' item' + (this.props.data.length !== 1 ? 's' : '');
8080
}
81-
return this.props.getItemString('Array', this.props.data, this.itemString, itemType);
81+
return this.props.getItemString('Array', this.props.data, itemType, this.itemString);
8282
}
8383

8484
render() {

src/JSONIterableNode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export default class JSONIterableNode extends React.Component {
9696
}
9797
this.itemString = count + ' entr' + (count !== 1 ? 'ies' : 'y');
9898
}
99-
return this.props.getItemString('Iterable', this.props.data, this.itemString, itemType);
99+
return this.props.getItemString('Iterable', this.props.data, itemType, this.itemString);
100100
}
101101

102102
render() {

src/JSONObjectNode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export default class JSONObjectNode extends React.Component {
8080
const len = Object.keys(this.props.data).length;
8181
this.itemString = len + ' key' + (len !== 1 ? 's' : '');
8282
}
83-
return this.props.getItemString('Object', this.props.data, this.itemString, itemType);
83+
return this.props.getItemString('Object', this.props.data, itemType, this.itemString);
8484
}
8585

8686
render() {

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default class JSONTree extends React.Component {
3939
getItemStringStyle: getEmptyStyle,
4040
getLabelStyle: getEmptyStyle,
4141
getValueStyle: getEmptyStyle,
42-
getItemString: (type, data, itemString, itemType) => <span>{itemType} {itemString}</span>
42+
getItemString: (type, data, itemType, itemString) => <span>{itemType} {itemString}</span>
4343
};
4444

4545
constructor(props) {

0 commit comments

Comments
 (0)