cancel
Showing results for 
Search instead for 
Did you mean: 

data-bind is not get processed in uiComponent

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

data-bind is not get processed in uiComponent

Hi,
I have a problem with data-bind processing. It's not get processed in template if it was added into uiComponent.

 

Example:

 

uiComponent

...
<fieldset name="test_data_bind"> <argument name="data" xsi:type="array"> <item name="config" xsi:type="array"> <item name="label" xsi:type="string" translate="true">Test data-bind</item> <item name="collapsible" xsi:type="boolean">true</item> <item name="sortOrder" xsi:type="number">30</item> </item> </argument> <container name="test_data_bind_container" > <argument name="data" xsi:type="array"> <item name="config" xsi:type="array"> <item name="sortOrder" xsi:type="number">10</item> </item> </argument> <htmlContent name="test_data_bind_html_content"> <argument name="block" xsi:type="object">TestVendor\TestModule\Block\Adminhtml\Test</argument> </htmlContent> </container> </fieldset>
...

Block

<?php
namespace TestVendor\TestModule\Block\Adminhtml;

class Test extends \Magento\Backend\Block\Template
{
	protected $_template = 'TestVendor_TestModule::widget/form/test.phtml';
}

Template

<a data-bind="click: alert('x');">Test</a> 


If same block is added directly to layout then everything is fine and data-bind get processed and i see alert message on click.
But i need to get it as a fieldset of uiComponent.

What am i doing wrong and how can i do this?

Thanks in advance.