Skip to content

Commit d7bbaff

Browse files
authored
Merge pull request #1 from TECHENGINESSRL/master
Fix multi level json edit
2 parents 27a76d5 + 054679e commit d7bbaff

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
2-
"name": "tariff-react-json-view",
3-
"description": "Interactive react component for displaying javascript arrays and JSON objects.",
4-
"version": "1.19.0",
2+
"name": "react-json-view",
3+
"description":
4+
"Interactive react component for displaying javascript arrays and JSON objects.",
5+
"version": "1.19.1",
56
"main": "dist/main.js",
67
"dependencies": {
78
"flux": "^3.1.3",

src/js/components/CopyToClipboard.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export default class extends React.PureComponent {
9797
}
9898

9999
return (
100-
<span class="copy-to-clipboard-container">
100+
<span class="copy-to-clipboard-container" title="Copy to clipboard">
101101
<span
102102
style={{
103103
...style,

src/js/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,14 @@ class ReactJsonView extends React.PureComponent {
116116
editKeyRequest: false
117117
});
118118
}
119+
if (prevProps.src !== this.state.src) {
120+
ObjectAttributes.set(
121+
this.rjvId,
122+
'global',
123+
'src',
124+
this.state.src
125+
);
126+
}
119127
}
120128

121129
componentWillUnmount() {

0 commit comments

Comments
 (0)