Skip to content

Commit e2ca308

Browse files
authored
Merge pull request mac-s-g#321 from mac-s-g/copy-to-clipboard-bug
copy to clipboard callback bugfix
2 parents 91b4c3c + 3d1b050 commit e2ca308

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

demo/dist/main.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "react-json-view",
33
"description": "Interactive react component for displaying javascript arrays and JSON objects.",
4-
"version": "1.20.3",
4+
"version": "1.20.4",
55
"main": "dist/main.js",
66
"dependencies": {
77
"flux": "^4.0.1",

src/js/components/VariableEditor.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ class VariableEditor extends React.PureComponent {
4545
render() {
4646
const {
4747
variable,
48-
src,
4948
singleIndent,
5049
type,
5150
theme,
@@ -54,8 +53,7 @@ class VariableEditor extends React.PureComponent {
5453
enableClipboard,
5554
onEdit,
5655
onDelete,
57-
onSelect,
58-
rjvId
56+
onSelect
5957
} = this.props;
6058
const { editMode } = this.state;
6159

@@ -130,7 +128,7 @@ class VariableEditor extends React.PureComponent {
130128
hidden={editMode}
131129
src={variable.value}
132130
clickCallback={enableClipboard}
133-
{...{ theme, namespace }}
131+
{...{ theme, namespace: [...namespace, variable.name] }}
134132
/>
135133
) : null}
136134
{onEdit !== false && editMode == false

0 commit comments

Comments
 (0)