Skip to content
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

Use BigInt and datatables>=1.13 rather than converting large integers to str #172

Closed
mwouts opened this issue Mar 26, 2023 · 0 comments · Fixed by #235
Closed

Use BigInt and datatables>=1.13 rather than converting large integers to str #172

mwouts opened this issue Mar 26, 2023 · 0 comments · Fixed by #235

Comments

@mwouts
Copy link
Owner

mwouts commented Mar 26, 2023

This is a follow-up on #152 . Large Python integers cannot be represented as native JavaScript integers. From itables==1.5.2 we therefore convert them to str, but because of that they might not be sorted properly in datatables.

A more correct workaround would be

  • to encode the large integers using BigInt (however this does not seem to be supported by json.dumps at the moment?)
  • to use datatables>=1.13 which has support for these BigInt (however datatables>=1.13 requires import maps, which is a significant change, and will require modern browsers)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant