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) Add unique key prop to field component instances #328

Merged
merged 2 commits into from
Jun 19, 2024

Conversation

samuelmale
Copy link
Member

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. If there is a ticket, make sure your PR title includes a conventional commit label. See existing PR titles for inspiration.
  • My work conforms to the OpenMRS 3.0 Styleguide and design documentation.
  • My work includes tests or is validated by existing tests.

Summary

This PR ensures that FieldComponent instances are properly identified and managed by React, preventing potential rendering issues. Specifically, it addresses a recently reported issue where ui-select-ext instances were rendering incorrectly and switching data sources.

Screenshots

Issue:

Screen.Recording.2024-06-18.at.6.48.40.PM.mov

Fixed:

2024-06-18 16-41-58 2024-06-18 16_42_39

Related Issue

Other

Copy link

github-actions bot commented Jun 18, 2024

Size Change: +14 B (0%)

Total Size: 1.05 MB

ℹ️ View Unchanged
Filename Size Change
dist/184.js 11.2 kB 0 B
dist/225.js 2.57 kB 0 B
dist/29.js 163 kB 0 B
dist/300.js 709 B 0 B
dist/31.js 5.32 kB 0 B
dist/318.js 2.43 kB 0 B
dist/327.js 1.84 kB 0 B
dist/335.js 967 B 0 B
dist/353.js 3.02 kB 0 B
dist/371.js 71.5 kB 0 B
dist/41.js 3.36 kB 0 B
dist/436.js 759 B 0 B
dist/465.js 182 kB 0 B
dist/540.js 2.63 kB 0 B
dist/55.js 2.14 kB 0 B
dist/635.js 14.3 kB 0 B
dist/8.js 3.68 kB 0 B
dist/800.js 245 kB +8 B (0%)
dist/979.js 6.85 kB 0 B
dist/99.js 690 B 0 B
dist/993.js 3.09 kB 0 B
dist/998.js 15.6 kB 0 B
dist/main.js 300 kB +6 B (0%)
dist/openmrs-form-engine-lib.js 3.77 kB 0 B

compressed-size-action

@samuelmale
Copy link
Member Author

I've also filed a ticket about the ui-select-ext instance loosing state: https://openmrs.atlassian.net/browse/O3-3448

Copy link
Contributor

@arodidev arodidev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @samuelmale shouldn't we do the same for the field components within obsGroups?

@samuelmale
Copy link
Member Author

@arodidev done!

Copy link
Contributor

@arodidev arodidev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arodidev arodidev merged commit 496e43d into main Jun 19, 2024
4 checks passed
@arodidev arodidev deleted the fix/useUniqueKeys branch June 19, 2024 10:58
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.

None yet

2 participants