-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught TypeError: Cannot read property 'yadcfState' of null #614
Comments
I just upgraded to beta.40 by hand (28 is available on yarn, so I preferred that earlier) and can reproduce the behaviour there as well. |
In fact, the error disappears when I remove the render function. |
Uhm, when I reinstall (beta 28 or 40, doesn't matter) this behaviour disappears. Maybe I had the wrong beta (possibly 5, from npm) installed here. |
Ugh, it just reappeared again, unfortunately. I'll see what actually reproduces this on my part. |
testcafe reproduces this reliably, but I've seen this error in the actual browser console as well... still investigating... |
(I hope you don't mind if I'm keeping notes on this closed issue. I'll reopen it when I'm sure that it's a bug in yadcf as opposed to my own code or testcafe. Testcafe is probably out of the picture because I could at some point reproduce it in the browser by hand.) Firefox (Quantum 68.4.2esr (64-Bit)) gives a different error (the above was with chromium ( 80.0.3987.87 (openSUSE Build) (64-Bit))):
I think that's because firefox doesn't correctly parse the source-map (no idea why). From the line numbers, it looks like it's this function: function saveTextKeyUpState(oTable, table_selector_jq_friendly, column_number, regex_check_box, null_checked, exclude) {
if (oTable.fnSettings().oFeatures.bStateSave === true && oTable.fnSettings().oLoadedState.yadcfState) {
if (oTable.fnSettings().oLoadedState.yadcfState !== undefined && oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly] !== undefined) {
oTable.fnSettings().oLoadedState.yadcfState[table_selector_jq_friendly][column_number] = {
regex_check_box: regex_check_box,
null_checked: null_checked,
exclude_checked: exclude
};
} else {
yadcfState = {};
yadcfState[table_selector_jq_friendly] = [];
yadcfState[table_selector_jq_friendly][column_number] = {
regex_check_box: regex_check_box,
exclude_checked: exclude,
null_checked: null_checked
};
oTable.fnSettings().oLoadedState.yadcfState = yadcfState;
}
oTable.fnSettings().oApi._fnSaveState(oTable.fnSettings());
}
} The problem in chromium is in the same line of code, the phrasing is just different
So for some reason From the way it behaves (sometimes the error is thrown after the click, sometimes on keyboard input) I would suspect it's related to timing. |
I'm confused now. I'm using datatables 1.10.19 (could try upgrading to 1.10.20 if that helps). |
(Not sure that this is a bug in yadcf yet, but maybe you can clarify things.) |
Unfortunately the minor datatables upgrade does not help. |
This is an obvious "fix" for my case and my app and the testcafe tests work. I don't know why oLoadedState is null here, why the legacy api is apparently used and there are lots of other things I don't know.
fixed by #615 |
#614 - Uncaught TypeError: Cannot read property 'yadcfState' of null
I see the following with 0.9.4-beta.28 (via yarn).
This happens when I type into a column search field.
This is defined as:
Not sure if relevant, the datatables column has a render property:
Sorry, if this is not a bug in yadcf.
The text was updated successfully, but these errors were encountered: