react icon indicating copy to clipboard operation
react copied to clipboard

[BUG] Custom component not getting submission data

Open jepz opened this issue 5 years ago • 6 comments

Environment

Please provide as many details as you can:

  • Hosting type
    • [] Form.io
    • [x] 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 <Form form={form} submission={submission}/>.
  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 avatar Jul 16 '20 11:07 jepz

@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.

wag110894 avatar Aug 04 '20 19:08 wag110894

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

abhilash-aot avatar Sep 28 '20 03:09 abhilash-aot

Same happens to me

Benzer1406 avatar Aug 09 '22 14:08 Benzer1406

Having the same issues, any solutions yet?

justinnc avatar Oct 03 '23 15:10 justinnc

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

AlpineM avatar Oct 11 '23 18:10 AlpineM

An example updated React 18 + Custom Component working! Demo

sabato-galasso avatar Apr 29 '24 09:04 sabato-galasso