concat view for gaffa
npm i gaffa-concat
gaffa.actions.constructors.concat = require('gaffa-concat');
Assuming a model such as:
{
targetArray: [0,1,2],
sourceArray: [3,4,5]
}
Set up the action
var concatItems = new concat();
concatItems.source.binding = '[sourceArray]';
concatItems.target.binding = '[targetArray]';
After being triggered, the model will look like:
{
targetArray: [0,1,2,3,4,5],
sourceArray: [3,4,5]
}
A binding to an array to concat into
A binding to an array to concat from
Default: true;
Whether to clone the items in the source array.