giorgosart / react-easy-edit

Inline editing library for React
https://giorgosart.gitbook.io/react-easy-edit/
MIT License
252 stars 46 forks source link

The component value is not updateded when the state changes #12

Closed joingenor closed 5 years ago

joingenor commented 5 years ago

I am trying to use this component:

<EasyEdit type="textarea" onSave={(e)=>{this.handleBuildingSave(e,'info');}} onValidate={() => true} value={selectedBuilding.info} saveButtonLabel={getLocalizedStrings(userLang).SAVE} cancelButtonLabel={getLocalizedStrings(userLang).CANCEL} saveButtonStyle={'button'} cancelButtonStyle={'button'} attributes={{name: 'buildingInfo', rows:'5', cols:'35', id: 'name-buildingInfo',style:inlineEditStyle}} />

{selectedBuilding.info}
// this displays correctly The selectedBuilding.info are a coming from redux store. When my redux store update this value the value in the EasyEdit component is not updated. If I show the redux store value in a div it shows the correct value.
giorgosart commented 5 years ago

@joingenor thank you for the bug report, let me take a look at this, will get back to you asap

giorgosart commented 5 years ago

Hello @joingenor we will fix this issue in our next minor release, shouldn't take too long to fix this, I was able to replicate your issue

giorgosart commented 5 years ago

Fixed as part of 0.3.1

joingenor commented 5 years ago

sweet.... That was fast response.... 😀

Sendt fra min iPhone

  1. mar. 2019 kl. 19:50 skrev George Artemiou notifications@github.com:

Fixed as part of 0.3.1

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

giorgosart commented 5 years ago

No prob. Let me know if you find any other bugs