OverviewThe Undo subcomponent is a special class of subcomponent called a component decorator. It can be used to provide undo support for any component that bears a model. Currently, the Fluid components that support Undo are: Enabling Undo on Components that Support itThe Undo subcomponent can be added to a parent component that supports it by specifying the subcomponent type and options in the componentDecorators option parameter to the parent component. (See Subcomponents for more information.) Code Block |
---|
|
var opts = {
componentDecorators: {
type: "fluid.undoDecorator",
options: {
selectors: myUndoSelectors,
renderer: myUndoRenderer
}
}
};
var myComponent = fluid.component(container, opts);
|
If no customized options are desired, the string type can be provided as the componentDecorators value instead: Code Block |
---|
|
var opts = {
componentDecorators: "fluid.undoDecorator"
};
var myComponent = fluid.component(container, opts);
|
|