Description
Iterate.ArrayPushButton
connects to the array of a surrounding Iterate.Array
or an array from the source pointed at through path
and adds a new element to the array when clicked.
Demos
Primitive elements
<Iterate.ArrayPushButtontext="Add another element"value={['foo', 'bar']}pushValue="new"onChange={(value) => console.log('onChange', value)}/>
Object elements
<DataContext.Providerdata={[{name: 'Iron Man',},{name: 'Captain America',},{name: 'Thor',},]}onChange={(value) => console.log('onChange', value)}><Iterate.Array path="/"><Field.String elementPath="/name" /></Iterate.Array><Iterate.ArrayPushButtontop="small"text="Add another element"path="/"pushValue={{}}/></DataContext.Provider>