将自定义列添加到 SAPUI5 smart - columnKey 错误

Adding custom column to SAPUI5 smart - columnKey error

我有一个 XML 视图,其中智能 table 绑定到 oData 服务。对于这个智能 table 我想为 erdat 添加一个自定义列,如 SAPUI5 sample.

中所述

来自 XML 视图的代码:

<smartTable:SmartTable id="smartTable0" entitySet="<my_entity_set>" enableAutoBinding="true" beforeRebindTable="onBeforeRebindTable"
    tableType="ResponsiveTable" useExportToExcel="true" useTablePersonalisation="true" showRowCount="true" showFullScreenButton="true"
    class="sapUiResponsiveContentPadding" exportType="UI5Client" demandPopin="true">
    <smartTable:layoutData>
        <FlexItemData growFactor="1" baseSize="0%"/>
    </smartTable:layoutData>
    <Table alternateRowColors="true" fixedLayout="false" growing="true" growingScrollToLoad="true" growingThreshold="20">
        <columns>
            <Column width="200px" hAlign="Begin">
                <customData>
                    <core:CustomData key="p13nData" value="\{'columnKey': 'erdat', 'leadingProperty': 'erdat', 'columnIndex': '0'}"/>
                </customData>
                <Text text="Erdat"/>
            </Column>
        </columns>
        <items>
            <ColumnListItem>
                <cells>
                    <Text text="{path: 'erdat'}"/>
                </cells>
            </ColumnListItem>
        </items>
    </Table>
</smartTable:SmartTable>

如果没有自定义列,智能 table 会按预期显示数据。当我添加自定义列时出现错误:

Uncaught (in promise) The table instance contains some columns for which a columnKey is provided, some for which a columnKey is not provided.

table 仅显示第 headers 列,但没有数据。我尝试了几种有无 columnKeyleadingProperty 的组合,但没有成功。字段 erdat 包含在 oData 服务中。

网络搜索没有为我提供解决方案。任何帮助将不胜感激。

如果我将 ' 替换为 ",反之亦然 <core:CustomData value=...>,它会按预期工作。应该完全按照示例输入...