Closed ahmadghizzawi closed 5 years ago
I'm gonna review and test it this weekend. If it's okay then i'll merge your code and bump the version and thank you for taking the time to improve this lib !
@nysamnang thoughts?
@ahmadghizzawi Of course, After testing I found out the issue that you mentioned above. The problem was the local state not updating based on props. To fix this we better use componentWillReceiveProps
rather than using componentDidUpdate
. I already fixed https://github.com/nysamnang/react-native-24h-timepicker/commit/b907552d9b27d968df623454d265cf5f412ab783 and published the new version a few minutes ago, if you want it please kindly upgrade to the latest version.
Thanks for taking the time to improve this lib :)
Hey there!
While trying to use this TimePicker in our app, the TimePicker would not update the selectedHour and selectedMinute values after the initial props are passed unless onConfirm and onCancel are called. This means that if you try to update the selectedHour and selectedMinute, the new props would be ignored.
I fixed this issue by adding componentDidUpdate (check the commit).
Thanks!