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) Highlight selected options for the multi-select component #366

Merged
merged 2 commits into from
Aug 13, 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

Fixes an issue where the selected items aren't highlighted, which was obscuring visibility.

Screenshots

Issue:

Screenshot 2024-08-12 at 13 08 46

Fixed:

Screenshot 2024-08-12 at 13 04 23

Related Issue

Other

Copy link

github-actions bot commented Aug 12, 2024

Size Change: -148 B (-0.01%)

Total Size: 1.14 MB

ℹ️ View Unchanged
Filename Size Change
dist/151.js 300 kB 0 B
dist/225.js 2.57 kB 0 B
dist/277.js 1.84 kB 0 B
dist/3.js 481 B 0 B
dist/300.js 642 B -68 B (-9.58%) 👏
dist/335.js 968 B 0 B
dist/353.js 3.02 kB 0 B
dist/41.js 3.37 kB 0 B
dist/422.js 6.8 kB 0 B
dist/540.js 2.63 kB 0 B
dist/55.js 758 B 0 B
dist/572.js 252 kB -26 B (-0.01%)
dist/617.js 86.9 kB 0 B
dist/635.js 14.3 kB 0 B
dist/733.js 107 kB 0 B
dist/901.js 11.8 kB 0 B
dist/99.js 691 B 0 B
dist/993.js 3.09 kB 0 B
dist/main.js 340 kB -54 B (-0.02%)
dist/openmrs-esm-form-engine-lib.js 3.67 kB 0 B

compressed-size-action

@@ -131,7 +131,7 @@ const MultiSelect: React.FC<FormFieldInputProps> = ({ field, value, errors, warn
</Layer>
</div>
<div className={styles.selectionDisplay}>
{value?.length && field.questionOptions.answers?.length > 5 ? (
{value?.length ? (
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks @samuelmale. Question though, doesn't this introduce the selected tags also for the multi-select checkboxes? IMO, we may not need to see the tags for the checkboxes since it is already clear which items are selected at first glance.

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated:

Screenshot 2024-08-13 at 10 21 10

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.

LGTM

@samuelmale samuelmale merged commit 975cb53 into main Aug 13, 2024
4 checks passed
@samuelmale samuelmale deleted the fix/highlightSelectedOptions branch August 13, 2024 14:02
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