formio / angular

JSON powered forms for Angular

Home Page:https://formio.github.io/angular-demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

dinbtechit opened this issue · comments

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?

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