-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Allow input and display of floats for Number fields #6987
Labels
Comments
Here is the GitStart Ticket for this issue: https://clients.gitstart.com/twenty/5449/tickets/TWNTY-6987 |
FelixMalfait
added
scope: back+front
Issues requiring full-stack knowledge
prio: low
type: feature
size: short
labels
Sep 12, 2024
Hello @Bonapara 👋 |
Thank you @Bonapara |
ijreilly
added a commit
that referenced
this issue
Oct 4, 2024
### Description - We added a decimal field for a Number Field type in the settings - We updated the Number Field type create a form with decimals input - We are not implementing the dropdown present on the Figma because it seems not related ### Demo <https://www.loom.com/share/18a8d4b712a14f6d8b66806764f8467f?sid=3fc79b46-ae32-46e3-8635-d0eee02e53b2> Fixes #6987 --------- Co-authored-by: gitstart-twenty <[email protected]> Co-authored-by: Marie Stoppa <[email protected]>
harshit078
pushed a commit
to harshit078/twenty
that referenced
this issue
Oct 14, 2024
### Description - We added a decimal field for a Number Field type in the settings - We updated the Number Field type create a form with decimals input - We are not implementing the dropdown present on the Figma because it seems not related ### Demo <https://www.loom.com/share/18a8d4b712a14f6d8b66806764f8467f?sid=3fc79b46-ae32-46e3-8635-d0eee02e53b2> Fixes twentyhq#6987 --------- Co-authored-by: gitstart-twenty <[email protected]> Co-authored-by: Marie Stoppa <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Scope & Context
We only allow to persist and display integers for fields of type Number while there is demand for persisting/displaying floats + all our number fields data is stored in a column that accepts floats.
Expected behavior
We always persist the input value if it's a number, but we display the value according to the decimal settings.
So for example let's say we have set the number of decimal to 0, but the input the value is 2.6.
We persist 2.6 and display 3.
Technical inputs
The vision is to introduce a setting on fieldType of type 'NUMBER'.
NumberFieldTypeSetting {
decimals: number
}
This settings is settable in the product. Here is the design:
This settings should be leveraged in the FE to display the value correctly.
In case it can be of any help - a first PR was opened on this topic but the issue can be taken over from scratch.
The text was updated successfully, but these errors were encountered: