如何在reactjs上使用jquery datatables.net重音中和插件

bwitn5fc  于 2021-09-13  发布在  Java
关注(0)|答案(0)|浏览(163)

我的react js projet上有一个jquery datatables组件。
我需要使用官方的datatables.net插件(accent neutralize),以便搜索选项忽略重音字符。
问题是,我不知道在初始化表时如何调用插件。
这是表初始化:

setupPlugin() {
    this.$el = $(this.el);    
    this.$el.DataTable({               
        "dom": '<"row col-12"<"d-flex justify-content-start col-sm-12 col-md-4"f><"d-flex justify-content-center col-sm-12 col-md-4"i><"d-flex justify-content-end col-sm-12 col-md-4"l>>t<"row col-12"<"d-flex justify-content-start col-sm-12 col-md-6"p><"d-flex justify-content-end col-sm-12 col-md-6"Br>>', 
        "buttons": ["copy", "excel", "pdf", "print", "colvis"],            
        "language": languageStrings,
        "responsive": true,
        "order": [[ 1, "asc" ]],
        "columnDefs": this.getRowButtonsDefs()                        
    }); 
}

以下是官方插件的链接:
https://datatables.net/plug-ins/filtering/type-based/accent-neutralise
我怎么做?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题