Have the paint-editor container listen to selectedItems

This solves the issue of buttons not updating their disabled/enabled state until being dragged by making sure that a re-render occurs whenever a new item is selected, checking again for state.
This commit is contained in:
Matthew Taylor 2017-10-26 09:28:01 -04:00
parent 128f9ca642
commit 2376a3ce63

View file

@ -123,6 +123,7 @@ PaintEditor.propTypes = {
};
const mapStateToProps = state => ({
selectedItems: state.scratchPaint.selectedItems,
undoState: state.scratchPaint.undo
});
const mapDispatchToProps = dispatch => ({