Skip to content

fix: add keys for fragment#2812

Merged
Ricbet merged 1 commit intomainfrom
fix/fix-fragment-keys
Jun 19, 2023
Merged

fix: add keys for fragment#2812
Ricbet merged 1 commit intomainfrom
fix/fix-fragment-keys

Conversation

@Aaaaash
Copy link
Copy Markdown
Member

@Aaaaash Aaaaash commented Jun 16, 2023

Types

  • 🐛 Bug Fixes

Background or solution

🤖 Generated by Copilot at 7c2a739

  • Simplify the logic for rendering separators in the menu data source by using a hasSeparator variable instead of checking for consecutive separators (link, link)
  • Wrap each menu node in a React.Fragment component with a unique key and conditionally render a Menu.Divider component after each node if hasSeparator is true, to avoid duplicate keys and unnecessary dividers in the actions/index.tsx file (link)

Changelog

🤖 Generated by Copilot at 7c2a739

Simplify and fix menu separators in core-browser package. Use a variable and fragments to avoid duplicate or missing dividers between menu nodes in actions/index.tsx.

@opensumi opensumi Bot added the 🐞 bug Something isn't working label Jun 16, 2023
@Ricbet Ricbet merged commit 0df83bd into main Jun 19, 2023
@Ricbet Ricbet deleted the fix/fix-fragment-keys branch June 19, 2023 12:07
Ricbet pushed a commit that referenced this pull request Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants