8000 fix(data-grid): prevents null or undefined break max content length calculation by amir-ba · Pull Request #2395 · telekom/scale · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(data-grid): prevents null or undefined break max content length calculation #2395

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

Merged
merged 3 commits into from
Jun 19, 2025

Conversation

amir-ba
Copy link
Collaborator
@amir-ba amir-ba commented Jun 19, 2025

From 2377

What does this PR do?

Quick summary

Data Grid component calculates the longest row. For this it relies on .toString() method to obtain its length.
Both null and undefined lack the former one, and will break the component after invoking the method.

What has been done

  • Add to 0 as default-
  • optional chaining to prevent these values from breaking the component.

Some Observations

  • This is my first PR here 👋🏻 so if I'm missing something let me know.
  • I'm still figuring lerna and this monorepo out, so any observations are welcome.
  • Tested locally in a mock project.

@amir-ba amir-ba requested a review from maomaoZH as a code owner June 19, 2025 10:43
@amir-ba amir-ba merged commit 32afca9 into main Jun 19, 2025
8 checks passed
@amir-ba amir-ba deleted the pr-2377 branch June 19, 2025 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0