Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Custom component not getting submission data #321

Open
1 task done
jepz opened this issue Jul 16, 2020 · 6 comments
Open
1 task done

[BUG] Custom component not getting submission data #321

jepz opened this issue Jul 16, 2020 · 6 comments
Labels

Comments

@jepz
Copy link

jepz commented Jul 16, 2020

Environment

Please provide as many details as you can:

  • Hosting type
    • [] Form.io
    • Local deployment
      • Version:
  • Formio.js version: 4.11.0
  • Frontend framework: react 16.13.1, react-formio 4.3.0, @rmwc ^6.1.0 (multiple components ), @storybook/react 5.3.19
  • Browser: Chrome, Mozilla Firefox, Safari
  • Browser version: Chrome 83, Firefox 77, Safari 13.

Steps to Reproduce

  1. Create a RMWC component (Textfield or Radio), create a custom component integration (similar to https://codesandbox.io/s/custom-formio-component-in-react-81qb6?from-embed=&file=/src/Custom/Toggle/index.js:2451-2460 ) .
  2. Create form setup and submission data ,add it to .
  3. Start up Storybook, go to form, input not changed to data in submission.

Expected behavior

When data from submission is loaded, this.dataValue should have the submission data.

Observed behavior

this.dataValue is null, notice that there is a this.dataForSettings that has the correct data but it's not accessible for my custom component.
Seems like there is a rerender of props that doesn't effect custom components, but basic components receives data from submission.

Example

Unsure what to provide.

@jepz jepz added the bug label Jul 16, 2020
@wag110894
Copy link

@jepz Thank you for reaching out! Form.io offers Support Packages that are for training, support, or development services. The hours can be used in one-hour increments at your convenience over a 90 day period. We will assign one of our senior developers to work directly with you in online sessions.

Please let us know if you are interested.

@abhilash-aot
Copy link

I am too facing the same issue I can see the data in the submission Response but its not displaying in the custom component. Please help to fix this or any work around available. Thanks

@Benzer1406
Copy link

Same happens to me

@justinnc
Copy link

justinnc commented Oct 3, 2023

Having the same issues, any solutions yet?

@AlpineM
Copy link

AlpineM commented Oct 11, 2023

Also having this issue in certain cases, for example within a Data Grid

@sabato-galasso
Copy link

sabato-galasso commented Apr 29, 2024

An example updated React 18 + Custom Component working! Demo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants