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 array search compatibility in RangeAutocompleteFormField #8021

Merged
merged 2 commits into from
Jun 14, 2024

Conversation

bodhish
Copy link
Member

@bodhish bodhish commented Jun 11, 2024

Related to #8020

Updates the RangeAutocompleteFormField component to ensure compatibility with older browsers by replacing the Array.findLast() method with a combination of Array.reverse() and Array.find().

  • Replaces the usage of findLast with a sequence of creating a shallow copy of the thresholds array, reversing it, and then using find to locate the desired threshold. This change avoids mutating the original array and ensures the functionality is supported across all targeted browser environments.

For more details, open the Copilot Workspace session.

@bodhish bodhish requested a review from a team as a code owner June 11, 2024 19:20
Copy link

vercel bot commented Jun 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
care-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 14, 2024 11:53am

Copy link

netlify bot commented Jun 11, 2024

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 2997a21
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/666c2f27c9079100086a40c6
😎 Deploy Preview https://deploy-preview-8021--care-egov-staging.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.

@bodhish
Copy link
Member Author

bodhish commented Jun 11, 2024

@gigincg can you review the PR?

Copy link

cypress bot commented Jun 11, 2024

Passing run #2754 ↗︎

0 124 0 0 Flakiness 0

Details:

Fix array search compatibility in RangeAutocompleteFormField
Project: CARE Commit: 2997a21cd5
Status: Passed Duration: 02:53 💡
Started: Jun 14, 2024 11:58 AM Ended: Jun 14, 2024 12:01 PM

Review all test suite changes for PR #8021 ↗︎

@khavinshankar khavinshankar merged commit a7eec27 into develop Jun 14, 2024
62 checks passed
@khavinshankar khavinshankar deleted the bodhish/fix-array-compatibility branch June 14, 2024 12:01
Copy link

@bodhish Your efforts have helped advance digital healthcare and TeleICU systems. 🚀 Thank you for taking the time out to make CARE better. We hope you continue to innovate and contribute; your impact is immense! 🙌

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