SearchBuilder / stateSave: SCRIPT5007: Unable to get property 'topRow' of undefined or null referen
SearchBuilder / stateSave: SCRIPT5007: Unable to get property 'topRow' of undefined or null referen
Error messages shown:
SCRIPT5007: Unable to get property 'topRow' of undefined or null reference
Description of problem:
When I enable stateSave an error appears for searchBuilder trying to find a property of topRow?
Has anyone encountered this before?
(u.searchBuilder=b._collapseArray(b.getDetails(!0)))});this.s.dt.on("column-reorder",function(){b.rebuild(b.getDetails())});a&&(a=this.s.dt.state.loaded(),null!==a&&void 0!==a.searchBuilder?(this.s.topGroup.rebuild(a.searchBuilder),this.s.topGroup.dom.container.trigger("dtsb-redrawContents"),this.s.dt.page.info().serverSide||(a.page?this.s.dt.page(a.page).draw("page"):this.s.dt.scroller&&this.s.dt.scroller().scrollToRow(a.scroller.topRow)),this.s.topGroup.setListeners()):!1!==this.c.preDefined&&(this.c.preDefined=
Answers
It's working as expected here. Could you look at that, please, and see if it helps. If it's still not working for you, please can you update my example, or link to your page, so that we can see the problem.
Cheers,
Colin
I am having a related issue. It isn't stopping it from working but it is throwing this error. Only if I have both stateSave and searchBuilder both active. If I disable either of them then I have no problem.
http://live.datatables.net/tutazike/1/edit
@mw777eds Thanks for that test case, but I'm not seeing that error. Please can you give steps on how to generate it,
Colin
Refresh the page after load. That gives an error on the live.datatables.net. I have also posted the page here so that you can open it normally. Again it loads without error but reloading the page gives the error. I think it is not finding what it needs to restore state.
Hi @mw777eds,
A fix was pushed for this a couple of weeks ago. It's currently available in the nightly builds. You may need to break the cache by appending
?alsvblaiusbfvla
to the end of the url in your script tag. We are hoping to make a SearchBuilder release in thee next few weeks.Thanks,
Sandy
Not sure if I am doing this wrong but getting errors including one on CSS, "Unexpected {" and then I believe it isn't finding the javascript. (I have it commented out now because it was breaking things)
You've included the CSS in the JS
<script>
tag there, which will likely be causing most of the issues.Allan