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

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

NOMADE55
Copy link

@NOMADE55 NOMADE55 commented Dec 19, 2024

What does this PR do?

Quick summary

Data Grid component calculates the longest row. For this it relies on the .toString() method. And then chains it to 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.

Copy link

netlify bot commented Dec 19, 2024

Deploy Preview for marvelous-moxie-a6e2fe ready!

Name Link
🔨 Latest commit 8ce3a45
🔍 Latest deploy log https://app.netlify.com/sites/marvelous-moxie-a6e2fe/deploys/6763a86cf40df400089a5922
😎 Deploy Preview https://deploy-preview-2377--marvelous-moxie-a6e2fe.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

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.

1 participant