sharepoint-online - SpFx + Ribbon function call
问题描述
I have Sharepoint App which is doing some ribbon customization. Basically, its adding a button within a ribbon. while i can add button successfully, its not invoking my function.
Following is snippet of my Ribbon XML:
<CommandUIHandler Command="ShowHelloWorldCommand" EnabledScript="return true;" CommandAction="test()" />
public test= () =>
alert('Hello!');
When ever i click on Ribbon button. it says test is not defined. unfortunately i can not move this function outside on page using content editor or script editor as my test function contains code from Graph Client.
is there a way to invoke function from ribbon ?
解决方案
推荐阅读
- snowflake-cloud-data-platform - 雪花中角色和用户的限制
- elasticsearch - Elasticsearch 使用不同的 UID 和 GID 注册备份存储库
- javascript - 如何在 Chrome 扩展中使用 JS 更改 Youtube 中的超链接?
- reactjs - material-ui / data-grid 灵活列宽 min-width
- sql - Prevent reordering after flattening a view
- java - org.apache.kafka.common.errors.SerializationException:检索 id 1 的 Avro 模式时出错
- bash - 如何防止 bash 脚本中的“conda activate”调用从脚本中获取参数?
- angular - 从离子角度上传文件时出错。但它通过 Postman Laravel API 工作
- pdf - wkhtmltopdf。生成文件夹
- arrays - 数组中的外键