mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #5590 from silverstripe-terraformers/fixes/boot-namespace
Add namespace for appBoot, and fix syntax error in GridField
This commit is contained in:
commit
c4929e8ce9
@ -45,4 +45,6 @@ function appBoot() {
|
||||
// Entwine hooks are being used to set up the <Provider>.
|
||||
// `window.onload` happens AFTER these Entwine hooks which means
|
||||
// the store is undefined when the <Provider> is constructed.
|
||||
$('body').entwine({ onadd: () => appBoot() });
|
||||
$.entwine('ss', () => {
|
||||
$('body').entwine({ onadd: () => appBoot() });
|
||||
});
|
||||
|
@ -11,6 +11,8 @@ import GridFieldAction from './GridFieldAction';
|
||||
import FormConstants from 'components/Form/FormConstants';
|
||||
import * as actions from 'state/records/RecordsActions';
|
||||
|
||||
const NotYetLoaded = {};
|
||||
|
||||
/**
|
||||
* The component acts as a container for a grid field,
|
||||
* with smarts around data retrieval from external sources.
|
||||
@ -161,13 +163,11 @@ GridField.propTypes = {
|
||||
}),
|
||||
};
|
||||
|
||||
const NotYetLoaded = {};
|
||||
|
||||
function mapStateToProps(state, ownProps) {
|
||||
const recordType = ownProps.data ? ownProps.data.recordType : null;
|
||||
return {
|
||||
config: state.config,
|
||||
records: recordType && state.records[recordType] ? state.records[recordType] : NotYetLoaded
|
||||
records: recordType && state.records[recordType] ? state.records[recordType] : NotYetLoaded,
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user