我发现数据源中的草稿记录已被弃用。我阅读了发行说明,但有一点代码有问题。尝试转换此:
widget.datasource.draft.Email = (newValue) ? newValue.PrimaryEmail : null;
到此:
widget.datasource.item.Email = (newValue) ? newValue.PrimaryEmail : null;
但是我得到了这个错误:无法设置空的属性"电子邮件">
有什么建议吗?小部件是从onValueChange操作传递的。
感谢
您可以在右侧的属性编辑器中将小部件的数据源更改为创建数据源。单击数据源绑定并选择"[datasource Name](create)"。(屏幕截图)
如果您想将小部件绑定到正常的数据源,另一种选择是以编程方式设置它:
widget.datasource.modes.create.item.Email = (newValue) ? newValue.PrimaryEmail : null;
以下是通过脚本访问create数据源的进一步文档。
我认为在转换为"item"之前,您需要将小部件的数据源设置为"Create"数据源。