You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 5, 2022. It is now read-only.
I tried to use a default image as obviously implemented in the code, but not working for me, since componentWillReceiveProps() is not fired.
I get the behavior I expected, if the initalization of the pictures state is already done in the constructor. However, I don't know if this would lead to undesired behavior.
Hi,
I tried to use a default image as obviously implemented in the code, but not working for me, since
componentWillReceiveProps()
is not fired.I get the behavior I expected, if the initalization of the
pictures
state is already done in the constructor. However, I don't know if this would lead to undesired behavior.By modifying this line:
react-images-upload/src/component/index.js
Line 19 in c19e67a
to:
pictures: this.props.defaultImage ? [this.props.defaultImage] : [],
the defaultImage works for me. Is this a reasonable change and could maybe modified for the component?
Edit: Of course I also had to uncomment the
componentWillReceiveProps()
function.The text was updated successfully, but these errors were encountered: