我正在尝试使用 amazon-quicksight-embedding-sdk 进行反应原生集成引发错误“未处理的承诺拒绝,[ReferenceError: Can't find variable: HTMLElement]”。是不是像 react-native 不支持的包一样?下面是我一直在尝试的代码。当使用 div 而不是 View 时,相同的代码适用于反应。
import * as QuickSightEmbedding from 'amazon-quicksight-embedding-sdk';
embedDashboard = (embeddedurl, containerDiv) => {
var dashboard;
var options = {
url: embeddedurl,
container: containerDiv,
scrolling: 'no',
height: '700px',
width: '1200px',
locale: 'en-US',
footerPaddingEnabled: true
};
dashboard = QuickSightEmbedding.embedDashboard(options);
dashboard.on('error', this.onError);
dashboard.on('load', this.onDashboardLoad);
};
componentDidMount() {
this.embedDashboard(embeddedurl, this.dsr.current);
}
render(){
return(
<View ref={this.dsr} style={{ overflow: 'scroll', width: '100%' }} />
)
}
对于使用 react-native 嵌入 Amazon Quicksight Dashboard 是否有替代包或建议?