Use new <FormBuilderLoader> react API

See https://github.com/silverstripe/silverstripe-framework/issues/5524
This commit is contained in:
Ingo Schommer 2016-10-20 08:37:41 +13:00
parent a0099fb03f
commit 2c72749af9
3 changed files with 4 additions and 3 deletions

View File

@ -11,4 +11,4 @@ setTimeout(function(){return t._renderForm()},100),this[0].style.setProperty("ov
a["default"].render(c["default"].createElement(l.Provider,{store:e},c["default"].createElement(d["default"],{schemaUrl:r,handleSubmit:function o(){return t._handleSubmit.apply(t,arguments)}})),this[0])
},_clearForm:function u(){a["default"].unmountComponentAtNode(this[0])},_handleSubmit:function s(t,e,n){return t.preventDefault(),n()}}),t(".TestReactFormBuilder .nav-link").entwine({onclick:function f(t){
t.preventDefault()}})})},function(t,e){t.exports=jQuery},function(t,e){t.exports=React},function(t,e){t.exports=ReactDom},function(t,e){t.exports=ReactRedux},function(t,e){t.exports=FormBuilder}])
t.preventDefault()}})})},function(t,e){t.exports=jQuery},function(t,e){t.exports=React},function(t,e){t.exports=ReactDom},function(t,e){t.exports=ReactRedux},function(t,e){t.exports=FormBuilderLoader}])

View File

@ -2,7 +2,7 @@ import jQuery from 'jQuery';
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import FormBuilder from 'components/FormBuilder/FormBuilder';
import FormBuilderLoader from 'containers/FormBuilderLoader/FormBuilderLoader';
jQuery.entwine('ss', ($) => {
/**
@ -37,7 +37,7 @@ jQuery.entwine('ss', ($) => {
ReactDOM.render(
<Provider store={store}>
<FormBuilder
<FormBuilderLoader
schemaUrl={schemaUrl}
handleSubmit={(...args) => this._handleSubmit(...args)}
/>

View File

@ -43,6 +43,7 @@ const config = {
'components/FormBuilderModal/FormBuilderModal': 'FormBuilderModal',
'components/FormBuilder/FormBuilder': 'FormBuilder',
'components/Toolbar/Toolbar': 'Toolbar',
'containers/FormBuilderLoader/FormBuilderLoader': 'FormBuilderLoader',
'state/breadcrumbs/BreadcrumbsActions': 'BreadcrumbsActions',
'deep-freeze-strict': 'DeepFreezeStrict',
i18n: 'i18n',