BUG: Style Manager setTarget does not work
Version: 0.16.22
What is the expected behavior? setTarget allows styling a CSS rule different from the selected component
Describe the bug Upon calling setTarget method Style Manager still has a selected component as styling target
What is the current behavior? setTarget doesn't update this.propTarget.model (updates this.propTarget.targets instead). Please compare the file style_manager\view\SectorsView.js:
Version 0.14.62 https://prnt.sc/v28tc2
Version 0.16.22 https://prnt.sc/v28ttv
Thanks for the report and the suggestion Maryia. The fix will be available in the next release (I hope to publish it tomorrow)
Hello @artf ! I have a question regarding this fix - setTarget now updates classes in Class section correctly, but Style Manager doesn't reflect the actual styles. Please see - https://prnt.sc/vfzuvv Maybe these is an event that can be triggered to update the values in Style Manager?
Thanks @maryia-kabash found the issue, will be fixed in the next release!
@maryia-kabash @artf Hi! I am trying to use setTarget method to style different component instead of selected component. but the method is not working or may be I am not calling it correctly.
I am calling the method as -
styleManager.setTarget('.box');
so, I am expecting it to style the element with classname 'box' instead of selected component. But it is not working. I don't know where and how to call this method to work. Please help!!
Hi @artf and @maryia-kabash
Still not working. This API was removed?
https://github.com/GrapesJS/components-tabs/blob/master/src/components/Tab.js#L17
@ronaldohoch Yeah, that method was actually never a public one, so I've changed it to select in order to keep it more consistent with other modules.
@ronaldohoch Yeah, that method was actually never a public one, so I've changed it to select in order to keep it more consistent with other modules.
currently the grapesjs-tabs plugin is still using the "setTarget", kindly change there or at least mention it in the readme file of it