简体   繁体   中英

yadcf error: Cannot read property 'oFeatures' of null at addRangeDateFilter

I'm running into the following issue:

jquery.dataTables.yadcf.js:1834 Uncaught TypeError: Cannot read property 'oFeatures' of null
    at addRangeDateFilter (jquery.dataTables.yadcf.js:1834)
    at appendFilters (jquery.dataTables.yadcf.js:3033)
    at HTMLTableElement.<anonymous> (jquery.dataTables.yadcf.js:3768)
    at HTMLDocument.dispatch (jquery.js:4435)
    at HTMLDocument.r.handle (jquery.js:4121)
    at Object.trigger (jquery.js:4350)
    at HTMLTableElement.<anonymous> (jquery.js:4901)
    at Function.each (jquery.js:374)
    at n.fn.init.each (jquery.js:139)
    at n.fn.init.trigger (jquery.js:4900)

This only occurs when I navigate to some other page and then come back to the old page. I am alo using range date filter on other pages with single datatables but this error doesn't come up. However on this page there are multiple datatables, so that might be a possible cause.

I'm using the following code:

yadcf.init(table, [           
{
 column_number: 5,
 filter_container_id: 'dateFilter',
 filter_type: 'range_date'
}],
{externally_triggered: true});

On loading the page initially there is no error but once I navigate back to this page after visiting some other page, this error comes up.

Is there any method to get around this?

我有一个旧版本的 jquery 运行,更新了库,这得到了修复。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM