diff --git a/gutenberg b/gutenberg index 1b5653ad926b3c..22085346e55e22 160000 --- a/gutenberg +++ b/gutenberg @@ -1 +1 @@ -Subproject commit 1b5653ad926b3c26569281c3d170b6e69a8a6669 +Subproject commit 22085346e55e22b511c7be1db9ea43f285a1c500 diff --git a/jest.config.js b/jest.config.js index f5183cee2652d8..fd4c9e60b78cb8 100644 --- a/jest.config.js +++ b/jest.config.js @@ -32,7 +32,7 @@ module.exports = { 'node', ], moduleNameMapper: { - '@wordpress\\/(blocks|data|element|deprecated|editor|redux-routine|block-library|components|keycodes|url|a11y)$': '/gutenberg/packages/$1/src/index', + '@wordpress\\/(blocks|data|element|deprecated|editor|redux-routine|block-library|components|keycodes|url|a11y|viewport|core-data|api-fetch|nux)$': '/gutenberg/packages/$1/src/index', // Mock the CSS modules. See https://facebook.github.io/jest/docs/en/webpack.html#handling-static-assets '\\.(scss)$': '/__mocks__/styleMock.js', diff --git a/src/block-management/block-holder.js b/src/block-management/block-holder.js index 0d1b24a8e2186c..b5ba888cd38b47 100644 --- a/src/block-management/block-holder.js +++ b/src/block-management/block-holder.js @@ -62,7 +62,6 @@ export default class BlockHolder extends React.Component { style = styles.blockText; } - // TODO: setAttributes needs to change the state/attributes return ( } onChange( clientId: string, attributes: mixed ) { - // Update datasource UI + // Update Redux store + this.props.onChange( clientId, attributes ); + + // Change the data source const index = this.getDataSourceIndexFromClientId( clientId ); const dataSource = this.state.dataSource; const block = dataSource.get( index ); block.attributes = attributes; dataSource.set( index, block ); - // Update Redux store - this.props.onChange( clientId, attributes ); } renderList() {