I have a case with a single xml view. Inside this view, there is a treetable with two columns.
<core:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m"
controllerName="sdf_test.App" xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:t="sap.ui.table" xmlns:var="sap.ui.comp.variants" xmlns:commons="sap.ui.commons"
xmlns:layout="sap.ui.layout">
<App>
<pages>
<Page>
<content>
<t:TreeTable id="mainPageTable" rowHeight="40"
enableColumnReordering="false" visibleRowCount="14">
<t:columns>
<!-- <t:Column> <CheckBox /> </t:Column> -->
<t:Column sortProperty="landscapeName" width="400px">
<Label text="sample" />
<t:template>
<Link text="{name}" enabled="{enabled}"/>
</t:template>
</t:Column>
<t:Column>
<Label text="Status" />
<t:template>
<Text text="{nodeName}" />
</t:template>
</t:Column>
</t:columns>
</t:TreeTable>
</content>
</Page>
</pages>
</App>
</core:View>
In the controller, I populate this treetable as shown below:
onInit : function() {
var that = this;
var oView = that.getView();
var mainPageTable = oView.byId("mainPageTable");
var oData = {
root:{
0: {
name: "item1",
enabled: true,
0: {
name: "subitem1-1",
enabled: true,
},
1: {
name: "subitem1-2",
enabled: false,
}
},
}
};
var oModel = new sap.ui.model.json.JSONModel();
oModel.setData(oData);
mainPageTable.setModel(oModel);
mainPageTable.bindRows("/root");
}
});
The issue I am facing is that when I initially open the "item1" root branch, I see one item enabled and the second one disabled. But if I close "item1" and reopen it, both fields become disabled, as illustrated in the images below.
First view: https://i.sstatic.net/qHu4S.png
Second view: