-
Notifications
You must be signed in to change notification settings - Fork 182
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
autoFill extension returns NaN
instead of incrementing
#1123
Comments
Doesn't fully restore the original behavior, but at least prevent greyouts. Issue has been openen at underlying library in hopes to support incremental drags again. rstudio/DT#1123
Looks like this is an upstream issue with DataTables, as the same problem can be reproduced in plain HTML: <!DOCTYPE html>
<html lang="en">
<head>
<link href="https://cdn.datatables.net/1.13.8/css/jquery.dataTables.min.css" rel="stylesheet">
<link href="https://cdn.datatables.net/autofill/2.6.0/css/autoFill.dataTables.css" rel="stylesheet">
<script src="https://code.jquery.com/jquery-3.7.0.min.js"></script>
<script src="https://cdn.datatables.net/1.13.8/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/autofill/2.6.0/js/dataTables.autoFill.min.js"></script>
</head>
<body>
<table id="mtcars" class="display" style="width: 100%; height: auto;"></table>
<script>
new DataTable("#mtcars", {
columns: [
{ title: "mpg" },
{ title: "cyl" },
{ title: "disp" },
{ title: "hp" },
{ title: "drat" },
{ title: "wt" },
{ title: "qsec" },
{ title: "vs" },
{ title: "am" },
{ title: "gear" },
{ title: "carb" }
] ,
data: [
[21, 6, 160, 110, 3.9, 2.62, 16.46, 0, 1, 4, 4],
[21, 6, 160, 110, 3.9, 2.875, 17.02, 0, 1, 4, 4],
[22.8, 4, 108, 93, 3.85, 2.32, 18.61, 1, 1, 4, 1],
[21.4, 6, 258, 110, 3.08, 3.215, 19.44, 1, 0, 3, 1],
[18.7, 8, 360, 175, 3.15, 3.44, 17.02, 0, 0, 3, 2],
[18.1, 6, 225, 105, 2.76, 3.46, 20.22, 1, 0, 3, 1]
],
autoFill: {
update: true
}
})
</script>
</body>
</html> |
@mikmart I'm less familiar with plain HTML code. Is there any way we could somehow enforce Since the problem in that case has nothing to do with this package, I will try to open an issue upstream at DataTables. Unfortunately it is not immediately clear to me where I should report this to the DataTable developers. I'll add a link here once I figure it out. |
DT embeds a specific version of DataTables in each release, so unfortunately at the moment your only option is to try an older version of DT. It you search
That would be great, thank you! |
@mikmart Reported the bug on their free community support page: Thanks for your help, let's hope they fix it soon. |
Quick update: apparently it's already fixed in the upcoming version of DataTables: So I guess this issue can be closed as soon as the needed releases have happened and the fix is incorporated in |
Hi,
The
autoFill
extension doesn't properly increment values anymore but instead producesNaN
.It used to work at some point in time.
MWE:
Drag a cell and click the increment button.
NaN
gets filled in:Tested browsers:
Chrome: Version 120.0.6099.129 (Official Build) (64-bit)
Firefox: 122.0 (64-bit)
By filing an issue to this repo, I promise that
xfun::session_info('DT')
. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('rstudio/DT')
.I understand that my issue may be closed if I don't fulfill my promises.
The text was updated successfully, but these errors were encountered: