support icon indicating copy to clipboard operation
support copied to clipboard

Should be possible to get the initialValue from Core/widget/Field

Open taauntik opened this issue 1 year ago • 1 comments

Forum post

Hello, team!

Coming to Bryntum from an ExtJS background, we noticed that the fields have no similar concept of original value.

We used it extensively for resetting fields to their original values. This is also the underlying mechanism for the form's dirty state which allows us to check if the form was changed and what specific fields were changed.

For Bryntum, one of our initial thoughts was to have a record property set on the fields' wrapping container/panel, which will help us track the changes and revert them. But this seems like an overkill for certain situations.

Do you have any suggestions on how to tackle this? Are there any plans to add something similar to Bryntum in the near future?

Regards, Serghei

taauntik avatar Apr 19 '24 14:04 taauntik

NOTE FROM USER :

Field.intialConfig.value would not work after the field is initialized and later its value is updated as a result of a server response. And we would want the data from server response to be set as field's original value.

Also, it will not work when you specify the field values using record or values properties on a wrapping container widget.

There should be an option to mark the field values as original (at any given point). Then, on a wrapping container, you could check if they were changed and reset them.

taauntik avatar Apr 24 '24 13:04 taauntik