属性窗格文本字段和编辑器面板值保留问题 [英] Property Pane text field and editor panel value retaining issue

查看:74
本文介绍了属性窗格文本字段和编辑器面板值保留问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


目前我们正在使用"没有JavaScript"框架的SharePoint Framework(SPFX)客户端Web部件。我们正在尝试插入多个
值属性窗格配置文本字段。

我们面临以下问题。

问题1当我在空白之后选择文本框时,文本字段值被重新分配为旧值,并且在关闭&
重新打开编辑器面板。

Issue 2如果我关闭并且关闭,则从编辑器面板中删除渲染值。打开编辑器面板窗口。

问题3.如何在不使用webpart的情况下制作非reactivePropertyChanges "disableReactivePropertyChanges"方法。

任何帮助高度赞赏。

推荐答案

您好,

属性窗格只有两种交互模式:Reactive和Non-reactive。

The property pane only has two interaction modes: Reactive and Non-reactive.

如果你想保留属性窗格的值,我们需要使用Reactive模式。

If you want to retain the values of the property pane, we need use the Reactive mode.

如果你想让非反应,我们有使用下面的代码。

If you want to make non reactive, we have to use the code below.

protected get disableReactivePropertyChanges(): boolean { 
  return true; 
}

这是一个解决方案,提供可重复使用的SPFx属性窗格控件供您参考。

Here is a solution provide reusable SPFx property pane controls for your reference.

https://github.com/SharePoint/sp-dev-fx-property-controls

文件:
https://sharepoint.github.io/sp-dev -fx-property-controls /

最好的问候,

Dennis


这篇关于属性窗格文本字段和编辑器面板值保留问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆