jsonforms icon indicating copy to clipboard operation
jsonforms copied to clipboard

TypeError: Cannot read property 'showUnfocusedDescription' of undefined

Open Naveenraj006 opened this issue 7 years ago • 4 comments

I came up with this error in reactjs. I tried the basic example of JSON forms with material Renderer.

https://user-images.githubusercontent.com/6183340/61995824-dff7d200-b0aa-11e9-91f6-8244e48a0841.png)

Naveenraj006 avatar Jul 27 '19 14:07 Naveenraj006

Thanks for the report. Sadly I'm not sure what exactly causes this problem for you. Could you provide some more details? Ideally you could send us a code snippet or example app which reproduces the problem. Did you try our react-seed application?

sdirix avatar Jul 29 '19 08:07 sdirix

I have the exact same error in my React application, it works fine with JsonFormsReduxContext and JsonFormsDispatch, but not with JsonForms : image

gives me this error : image

this line is causing the problem : image

image

To reproduce :

  • git clone this repository : https://github.com/eclipsesource/jsonforms-react-seed

  • run : "npm ci"

  • run : "npm start"

  • click : standalone image

  • open the console image

Quentinmht avatar Jul 30 '19 13:07 Quentinmht

Thank you for the very detailed information! We'll take a look soon.

sdirix avatar Jul 30 '19 13:07 sdirix

showUnfocusedDescription is a new property of config, seems like the default configuration is not being used by default.

As a workaround provide this configDefault as the inital config

export const configDefault = {
  /*
   * [text] whether to restrict the number of characters to maxLength,
   * if specified in the JSON schema
   */
  restrict: false,

  /*
   * [text] whether to resize the input's width to maxLength,
   * if specified in the JSON schema
   */
  trim: false,

  /*
   * [text] if input descriptions should hide when not focused
   */
  showUnfocusedDescription: false
};

Lily418 avatar Jul 30 '19 14:07 Lily418