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

BigInt interface precision bugs #20287

Open
br41nslug opened this issue Nov 1, 2023 · 3 comments · May be fixed by #20757
Open

BigInt interface precision bugs #20287

br41nslug opened this issue Nov 1, 2023 · 3 comments · May be fixed by #20757
Labels

Comments

@br41nslug
Copy link
Member

Describe the Bug

After Azri's comment here #20263 (comment) I went looking into the BigInt field type and found a few issue which likely have the same underlying cause.

All the 4 selectable interfaces seem to suffer from errors:

  • [input] Has a rounding issue when using BigInt numbers (even when using the Raw editor) and the arrow buttons do not work
  • [dropdown] Same as input as it uses an input for the dropdown item value
  • [radio] Same as input as it uses an input for the radio item value
  • [slider] doesnt allow you to slide
firefox_xTVRD80ISJ.mp4
firefox_M5Ihmsd6m9.mp4

I suspect all these issues are caused by accidentally casting a BigInt type to a Number losing precision.

To Reproduce

  • create a BigInt field
  • try to use any of the interfaces
  • specifically with BigInt values > 9007199254740991 or < -9007199254740991 (max and min safe integer)

Directus Version

10.7.1

Hosting Strategy

Self-Hosted (Docker Image)

@br41nslug
Copy link
Member Author

Related old PR #12891

@hanneskuettner
Copy link
Member

The underlying problem also messes with direct input to the input field. See attached video.

Screen.Recording.2024-04-29.at.12.01.23.mov

@mpcref

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 📋 Backlog
Development

Successfully merging a pull request may close this issue.

4 participants