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

[data grid] Thousand Separator for Numbers while in edit mode #5381

Closed
2 tasks done
Tracked by #9328 ...
capsloq opened this issue Jul 3, 2022 · 8 comments
Closed
2 tasks done
Tracked by #9328 ...

[data grid] Thousand Separator for Numbers while in edit mode #5381

capsloq opened this issue Jul 3, 2022 · 8 comments
Labels
component: data grid This is the name of the generic UI component, not the React module! feature: Editing Related to the data grid Editing feature new feature New feature or request waiting for 👍 Waiting for upvotes

Comments

@capsloq
Copy link

capsloq commented Jul 3, 2022

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Summary 💡

Numbers do get formatted after an edit was made.
However it would be more convenient to get a thousand separator while typing in numbers in edit mode
image

Examples 🌈

image

Motivation 🔦

Typing in a Number: 100000. Is it 100.000 or 1.000.000 ? Inline formatting would show the user right away

Order ID 💳 (optional)

No response

@capsloq capsloq added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jul 3, 2022
@cherniavskii
Copy link
Member

Hey @capsloq
You can achieve that by using a third-party library to format an input: https://mui.com/material-ui/react-text-field/#integration-with-3rd-party-input-libraries
Then you can use this input component as a custom edit component: https://mui.com/x/react-data-grid/editing/#create-your-own-edit-component

As for supporting thousand separator out of the box in the Data Grid - there are few issues related:

@cherniavskii cherniavskii added component: data grid This is the name of the generic UI component, not the React module! new feature New feature or request waiting for 👍 Waiting for upvotes feature: Editing Related to the data grid Editing feature and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jul 4, 2022
@flaviendelangle flaviendelangle changed the title [Data Grid] Thousand Separator for Numbers while in edit mode [data Grid] Thousand Separator for Numbers while in edit mode Jul 4, 2022
@capsloq
Copy link
Author

capsloq commented Jul 4, 2022

Gosh, i thought i read the entire documentation but i must have missed the #create-your-own-edit-component part entirely. This of course provides all the functionality needed. Thank you @cherniavskii

@capsloq capsloq closed this as completed Jul 4, 2022
@DanailH DanailH changed the title [data Grid] Thousand Separator for Numbers while in edit mode [data grid] Thousand Separator for Numbers while in edit mode Jun 19, 2023
@ghost
Copy link

ghost commented Oct 20, 2023

@cherniavskii @capsloq i am able to type the value but it does not show the changed value when i hit enter on the DataGrid cell,the default value is not changing

Updated Value:
image

Default Value:
image

i am using the same approach discussed above

@qadir1020
Copy link

@cherniavskii @capsloq i am able to type the value but it does not show the changed value when i hit enter on the DataGrid cell,the default value is not changing

Updated Value: image

Default Value: image

i am using the same approach discussed above

has anyone find out the solution?

@cherniavskii
Copy link
Member

@qadir1020 Did you try following the steps in #5381 (comment)?

@qadir1020
Copy link

qadir1020 commented Jan 15, 2024

Yes,but the defualt value is not changing,i have shared the screen shot above

@cherniavskii
Copy link
Member

@qadir1020 Can you open an issue with a minimal reproduction example so we can investigate?
Thanks!

@qadir1020
Copy link

sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module! feature: Editing Related to the data grid Editing feature new feature New feature or request waiting for 👍 Waiting for upvotes
Projects
None yet
Development

No branches or pull requests

3 participants