formio / angular

JSON powered forms for Angular
https://formio.github.io/angular-demo
MIT License
613 stars 461 forks source link

[Question] - [Custom Component] - Custom components are not maintain the state when dragging #1027

Open dinbtechit opened 6 months ago

dinbtechit commented 6 months ago

Custom components are not maintaining the values/state when dragged.

  1. I created a custom button component and have a property called buttonText to store the button text.
editform: () => {
return [{
 key: customOptions.buttonText,
 type: 'textfield'
 input: true,
 defaultValue: 'Complete Payment'
}]
  1. Added to the form and modified the buttonText field to "Pay Now". Everything works fine up until this point.

But when we drag the custom button, it shows the default value of "Complete Payment" rather than the updated value "Pay Now".

Kapture 2023-11-02 at 16 05 26

Any idea how I can fix this?

daneformio commented 2 months ago

@dinbtechit Can you let us know what versions you are using?