mac-s-g / react-json-view

JSON viewer for react
https://mac-s-g.github.io/react-json-view/demo/dist/
MIT License
3.42k stars 531 forks source link

fix(#347): change inputRef to ref to prevent runtime error #374

Open enricomad opened 3 years ago

enricomad commented 3 years ago

Motivation

When editing (focusing) an attribute value, VariableEditor causes react_devtools_backend to throw a runtime error due to usage of unrecognized attribute inputRef (instead of ref) in AutosizeTextarea component.

Warning: React does not recognize the `inputRef` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `inputref` instead. If you accidentally passed it from a parent component, remove it from the DOM element.

AutosizeTextarea docs related issue: https://github.com/mac-s-g/react-json-view/issues/347

dranitski commented 2 years ago

upvote this fix

damianpugliese commented 2 years ago

Some news for this Issue? The library is the best in my opinion but with this Issue I can't use it

AhmedBHameed commented 2 years ago

@mac-s-g Can you consider this PR as a fix? Appreciate your time.