问题标签 [spfx-extension]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
reactjs - SPFx React 组件属性窗格更新滞后
因此,我正在使用 aPropertyFieldSitePicker
和 a自定义 SPFx 组件的属性窗格PropertyFieldListPicker
。我的问题是,当我从菜单中PropertyFieldMultiSelect
选择选项时,会滞后一个选项。PropertyFieldListPicker
但是,如果我做出选择,它会更新,让我怀疑这是 React 状态问题。
在下面的代码中,以下是代码逻辑
然后
然后
然后
完整的组件类
参考资料: https ://pnp.github.io/sp-dev-fx-property-controls/controls/PropertyFieldListPicker/ https://pnp.github.io/sp-dev-fx-property-controls/controls/PropertyFieldMultiSelect/ https://pnp.github.io/sp-dev-fx-property-controls/controls/PropertyFieldSitePicker/