AdvancedForm Component (Undo,Redo,Reset)
It came up recently about how to clear out a Form after submitting data to a backend. The basic idea was to reset the form to the initial values. Well, then I got thinking that the solution to that problem also lends it self to make a history of changes. Thats where the Undo/Redo features come into play.
You can set the history change size with the “undoHistorySize” attribute. The rest is taken care for you. What ever values are set upon creation of the Form will be the values used when you click on the Reset button. To fire the reset all you need to do is call the “resetForm()” method of the AdvancedForm component.
The Advanced Form component provides Reset, Undo and Redo functionality.
Undo and Redo are accessed by pressing “ctrl-Z” and “ctrl-Y” repsectively.
The current component supports TextInput, TextArea, NumericStepper, RadioButton, CheckBox, and ComboBox. They must
be children of the Form or Form.FormItem components.
Recent Comments