uiwjs / react-json-view

A React component for displaying and editing javascript arrays and JSON objects.
https://uiwjs.github.io/react-json-view/
MIT License
188 stars 11 forks source link

Unknown event handler property `onCopied`. It will be ignored. #41

Open flame01010 opened 6 months ago

flame01010 commented 6 months ago

Hi [小弟调调]. How are you? I'm development one react component using your module currently. Your module is very good and useful. First of all, I'd like to appreciate you and your module. Thank you. And I had one problem to use. I were trying to use onCopied props but it ignored to handle. I attached error report below. Would you please help me? I need your response to solve this problem. I'm looking forward your response. Sincerely, Danylo, H. error

jaywcjlove commented 6 months ago

@danylo0000 If you provide a reproducible example of the issue, I can help you see what the problem is.

flame01010 commented 6 months ago

Hi @jaywcjlove. Thanks for your attention. And I'd like to provide with some example images. Here you are. One was displayed the using example and another was error report. Please help me how can I do. use error

jaywcjlove commented 6 months ago

@danylo0000 I'm unable to reproduce the error you described.

image
flame01010 commented 5 months ago

Hi @jaywcjlove. Sorry for wasting your time. I found the cause. This was my mistake, not the module's fault. Currently I am developing a specific component using your module. I patched the functionality of your module a bit to identify individual values, which caused the error. We apologize for altering your valuable work without your permission. Below, I have attached a picture showing the reason for patching the module. Please consider this. Also, in order to identify individual values, the path to that value was defined as props. I would appreciate it if you could tell me if this function can be performed with the module's unique properties and how to do it. Best regards, Danylo. H. reason patch path

jaywcjlove commented 5 months ago

@danylo0000 I didn't understand what you meant, not sure if the following example can help you.

<JsonView.KeyName
  render={({ children, ...reset }, { type, value, keyName }) => {
    // ...
  }}
/>
jaywcjlove commented 5 months ago

https://github.com/uiwjs/react-json-view/blob/d98d1c1b347793cdfe78a2da523bcd5a62de25df/core/src/section/Row.tsx#L24

<JsonView.Row
  render={({ children, ...reset }, { value, keyName, parentValue, keys }) => {
    // ...
  }}
/>
flame01010 commented 5 months ago

Thanks @jaywcjlove. If I find a possibility, I'll contact you.