react icon indicating copy to clipboard operation
react copied to clipboard

[BUG] Wizard. The set default value is not visible.

Open vaspaul opened this issue 5 years ago • 4 comments

Environment

  • React-formio version: "^4.2.4"
  • Formio.js version: "4.11.0"
  • Frontend framework: React "^16.8.6"
  • Browser: many browsers.
  • Browser version: many browser versions.

Steps to Reproduce

  1. Create a wizard form, add the input component to it, and save.
  2. Click "Edit" on the added input form component.
  3. Set default value. 2.1. Mark some value as default. 2.2. Pay attention to the "Preview" section: the corresponding value is not change. 2.3. Press "Save" button for save changes and close this window.
  4. In the previous step we change default value, but now we don't see it here.
  5. Open the input component editing window again. Now we see that the corresponding value in the "Preview" changed.

P.S.: This bug occurs with the "Select Boxes", "Radio", "Text Field" and etc form componens.

Expected behavior

  • It is expected that when the default value is changed, the corresponding SelectBoxes in the "Preview" section will automatically change.
  • When you click on the "Save" button, the "Select boxes" form component will be updated with the new default value.

Observed behavior

  • If you change the default value, the corresponding selection fields in the preview section do not change automatically.
  • When you click on the "Save" button, the "Select boxes" form component do not update with the new default value.

Example

Some code with "FormBuilder" component:

...
import { Formio, FormBuilder } from 'react-formio';
...
render() {
    ...
    <FormBuilder
        form={my_var_with_form_schema}
        ...
    />
    ...
}
...

Screens with error reproducing:

step1 step2 step3 step4

vaspaul avatar Oct 20 '20 12:10 vaspaul

Hello @vaspaul,

Thanks for reaching out!

We are aware of this issue and have resolved it in formio.js version 4.12.1-rc1. I hope that this helps.

Have a great weekend.

wag110894 avatar Oct 23 '20 19:10 wag110894

Hi, @wag110894 , Thank you for responding!

You know, I tried to change the formio.js versions to the following:

  • 4.12.1-rc.1
  • 4.12.1-rc.12
  • 5.0.0-m.1
  • 5.0.0-m.3

I saw the same thing with all of them - the bug is still reproduces. Can you check it on your PC?

vaspaul avatar Oct 26 '20 06:10 vaspaul

@vaspaul, Can you provide what version of the formio app you are running on? You may need to upgrade that in order to see the difference.

wag110894 avatar Oct 28 '20 20:10 wag110894

@wag110894 I created a very simple react-app, just a demo:

...
import { FormBuilder } from 'react-formio';
ReactDOM.render(
  <FormBuilder />,
  document.getElementById('root')
);

At the console you can see the versions that are being used: 4 3 0_12 4 1-rc 1_console With this versions, the bug still reproduces: 4 3 0_12 4 1-rc 1_step1 4 3 0_12 4 1-rc 1_step2

When I try to upgrade "formio.js" and "react-formio" versions to 5.0.0-m.1, an error appears: 5 0 0-m1_console 5 0 0-m1_error

vaspaul avatar Nov 05 '20 18:11 vaspaul

I am closing the issue as it was created too long ago and there is no new comments here. If the issue is not resolved, please reopen it. Thanks!

TanyaGashtold avatar Aug 31 '23 13:08 TanyaGashtold