-
Notifications
You must be signed in to change notification settings - Fork 86
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
ScaleDataGrid not displayed when there is null value in rows prop #2376
Comments
I can work on this one. I'll provide a fix in short. |
The problem persists if the value in the table cell is |
@VukDju do you have an example of this not working with Because I've seen this only breaking with |
@NOMADE55 I already gave an example for Here is the example of component crashing for number: |
@VukDju the issue comes from the A method within the component makes calculation on which cell has the longer content. For this, the values are transformed to string, but this is not possible with I've pushed a PR to fix this: #2377 |
@NOMADE55 Thank you for trying to solve this issue. I have to say that although your suggestion will prevent the ScaleDataGrid from crashing, I think additional changes need to be made on the UX side, as I described in my first post. The goal should be that the user can distinct between a null or missing value and a string containing blanks like this |
@VukDju prefacing that I'm just a random contributor and not having much to say in the future of the framework; the PR will fix the crashing issue, The UX part is something that might require a new Issue.
|
Scale Version
3.0.0-beta.56
Framework and version
React 18.3.1 with @telekom/scale-components-react
Current Behavior
When there is a null value within one of the arrays of the
rows
property, DataGrid is not displayed at all.Expected Behavior
Instead of not displaying the DataGrid at all when there is a null value in our data, the table cell containing the null value should be rendered with some specific styling, so that the user knows we are missing data.
An example of how it should like like when there is a null data can be seen on the image bellow:
Code Reproduction
Try it by setting prop
rows
on this demo page to variablerowsMockupWithNulls
and reload the preview:ScaleDataGrid not working when null data is present, Scale and React18 with Wrapper Package
Additional context
Error log from developer console:
The text was updated successfully, but these errors were encountered: