ag-grid排序不适用于其他第三方插件 [英] ag-grid sorting is not working with another third party plugin
本文介绍了ag-grid排序不适用于其他第三方插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
ag-grid排序不适用于其他第三方插件。
用于报告工具的Stimulsoft report.js。
ag-grid sorting is not working with another third party plugin. Stimulsoft report.js for reporting tool.
<html>
<head>
<script src="https://unpkg.com/ag-grid@13.3.1/dist/ag-grid.js"></script>
<script src="https://cdn.jsdelivr.net/npm/stimulsoft-reports-js@2018.2.3/stimulsoft.reports.js"></script>
</head>
<body>
<div id="myGrid" style="height: 100%;" class="ag-fresh"></div>
<script src="main.js"></script>
</body>
</html>
推荐答案
ComponentUtil.toNumber = function(value) {
if (typeof value === 'number') {
return value;
} else if (typeof value === 'string') {
return Number(value);
} else {
return undefined;
}
}
和在stimulsoft中
and in stimulsoft
Object.prototype.toNumber = function() {
if (this.sti_is(String) && this.indexOf(",") >= 0)
return Number(this.replaceAll(",", "."));
return Number(this)
}
所以由于这种冲突,排序是
so due to this conflict sorting is not able to do.
然后我在下面的行中添加然后解决了我的问题。
then i added below lines then solved my issue.
<script>
Object.prototype.toNumber = undefined;
</script>
这篇关于ag-grid排序不适用于其他第三方插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文