-
-
Notifications
You must be signed in to change notification settings - Fork 581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup Image widget and pass down onSelectItem
prop if any
#6132
Conversation
✅ Deploy Preview for plone-components canceled.
|
@@ -110,6 +93,7 @@ function Edit(props) { | |||
block={props.block} | |||
id={props.block} | |||
objectBrowserPickerType={'image'} | |||
onSelectItem={props.onSelectItem} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sneridagh I don't understand this passing of onSelectItem because at least in volto core there is no props.onSelectItem for Image block Edit.jsx. I do understand giving the ability to call this method if it's passed in the props of ImageWidget.jsx but in the case of Image block it's simply undefined and the fallback is called.
It's nice that you found more things to cleanup such as the extra compose actions!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I agree. I believe it can be removed. The intent of the onSelectItem function is to give developers more control over the ImageWidget, but in this case, it is undefined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ichim-david @dobri1408 Agreed! yeah, I'll remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@dobri1408 @ichim-david integrating it into VLT I found this.
📚 Documentation preview 📚: https://volto--6132.org.readthedocs.build/