我还在学习 react 和 cxjs 的东西。我正在尝试开发一个查找小部件,它会弹出一个带有网格的窗口,用户可以从中搜索并选择一个条目。
我想在 cxjs 网格单元格中使用链接,当单击链接时,我需要调用具有该特定行(record.id)的 id 的控制器方法。以下是我尝试过但没有成功的方法。
.....
style="max-width: 500px; width: 500px; max-height:500px;"
border={false}
columns={[
{
field: 'name', sortable: true,
items: <cx>
<Link onClick={(e, ins) => {
ins.store.set("$lookup.selText", e.? /* can I use e to get id and set it to store */);
ins.controller.selectRecord("{$record.id}"); // this doesn't work either
ins.parentOptions.dismiss();
}} text-tpl="{$record.name}"/>
</cx>,
header: {
style: 'width: 150px',
items: 'Name'
},
},
有人可以点亮一些灯吗?
谢谢,
普里扬加