Skip to content

Handle empty attribute values in SearchListItem#452

Merged
camdendotlol merged 1 commit intomasterfrom
cm/searchlist-empty-attributes
Feb 27, 2025
Merged

Handle empty attribute values in SearchListItem#452
camdendotlol merged 1 commit intomasterfrom
cm/searchlist-empty-attributes

Conversation

@camdendotlol
Copy link
Copy Markdown
Contributor

Summary

This PR updates SearchListItem to handle situations when one or more attribute values are empty.

  • when all values are empty, do not display the <ul> at all
  • when a given value is empty, don't render its <li> element or icon

As a byproduct of these changes I've moved attribute values into a memoized array, which should give some performance improvements as we're no longer calling every attribute's render callback on every render.

@camdendotlol camdendotlol merged commit 7af2f3c into master Feb 27, 2025
@camdendotlol camdendotlol deleted the cm/searchlist-empty-attributes branch February 27, 2025 21:41
@dleadbetter dleadbetter added the v2.3.4 Issues in v2.3.4 label Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v2.3.4 Issues in v2.3.4

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants