mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
add namespace for appBoot, and fix syntax error in GridField
This commit is contained in:
parent
67d3a8d544
commit
19a1ebe789
@ -45,4 +45,6 @@ function appBoot() {
|
|||||||
// Entwine hooks are being used to set up the <Provider>.
|
// Entwine hooks are being used to set up the <Provider>.
|
||||||
// `window.onload` happens AFTER these Entwine hooks which means
|
// `window.onload` happens AFTER these Entwine hooks which means
|
||||||
// the store is undefined when the <Provider> is constructed.
|
// 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 FormConstants from 'components/Form/FormConstants';
|
||||||
import * as actions from 'state/records/RecordsActions';
|
import * as actions from 'state/records/RecordsActions';
|
||||||
|
|
||||||
|
const NotYetLoaded = {};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The component acts as a container for a grid field,
|
* The component acts as a container for a grid field,
|
||||||
* with smarts around data retrieval from external sources.
|
* with smarts around data retrieval from external sources.
|
||||||
@ -161,13 +163,11 @@ GridField.propTypes = {
|
|||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
const NotYetLoaded = {};
|
|
||||||
|
|
||||||
function mapStateToProps(state, ownProps) {
|
function mapStateToProps(state, ownProps) {
|
||||||
const recordType = ownProps.data ? ownProps.data.recordType : null;
|
const recordType = ownProps.data ? ownProps.data.recordType : null;
|
||||||
return {
|
return {
|
||||||
config: state.config,
|
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