diff --git a/js/ex3/actions/CharActions.js b/js/ex3/actions/CharActions.js index 65b06ad..071c45c 100644 --- a/js/ex3/actions/CharActions.js +++ b/js/ex3/actions/CharActions.js @@ -1,12 +1,13 @@ var reflux = require('reflux'); -module.exports = reflux.createActions([ +const CharActions = module.exports = reflux.createActions([ "add", "remove", // TODO: Change to delete? "update", "save", "load", - - "setName", - "setPortrait", ]); + +['setName', 'setPortrait'].forEach((a) => { + CharActions[a] = reflux.createAction({sync: true}); +}); \ No newline at end of file diff --git a/js/ex3/components/PersistentCharacterEditor.jsx b/js/ex3/components/PersistentCharacterEditor.jsx index 3f202c5..5ac8d4a 100644 --- a/js/ex3/components/PersistentCharacterEditor.jsx +++ b/js/ex3/components/PersistentCharacterEditor.jsx @@ -53,7 +53,7 @@ export default React.createClass({ name: evt.target.value, }); - this.forceUpdate(); + // this.forceUpdate(); }, _portraitImageOnDrop: function(evt) {