Suite: Fix initial tab not selected when entity has only many-to-many relationships on Blazor UI #21836

Back

When an entity has only many-to-many (navigation connection) relationships and no regular properties/navigation properties, the main entity tab is conditionally hidden — but SelectedCreateTab/SelectedEditTab were still initialized to the now-nonexistent entity tab name, leaving no tab visually active on modal open.

Screenshot of the bug:

No tab selected on open

Changes

  • Item.razor_cs.txt — Replace hardcoded %%entity-name-camelcase%%-create/edit-tab (field declaration + reset-on-open assignments) with new tokens %%initial-selected-create-tab%% / %%initial-selected-edit-tab%%
  • BlazorUiGenerateCommand.cs (CreateItemRazorCsAsync) — Populate the new tokens:
    • Entity has properties or navigation properties → entity tab (existing behavior preserved)
    • Entity has only navigation connections → first navigation connection tab, so it opens automatically

Checklist

  • I fully tested it as developer / designer and created unit / integration tests
  • I documented it (or no need to document or I will create a separate documentation issue)
  • I worked with the design team to get their idea for UI/UX design (or no need to design for this PR)
  • I've assigned reviewer, related labels and set a milestone for this PR

How to test it?

Create a Blazor UI project in Suite, add an entity with only many-to-many relationships (no other properties). Open the create/edit modal — the first navigation connection tab should be active and visible on open.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Version
10.2.0-rc.2
Release Date
09 March, 2026
Labels
No labels
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.