Skip to content

Conversation

@jayesh70599
Copy link

Description

This PR fixes a frontend crash (TypeError: content.map is not a function) that occurs in the Content Manager's List View.

The issue was caused by a state logic mismatch in ListViewPage.tsx. When a user navigates between two content types that share an component/field name but have different data structures—specifically switching from a Repeatable Component (array) to a String—the dashboard incorrectly attempts to render the string using the repeatable component's logic.

Root Cause

In the ListViewPage, when list.layout changes, we pass updated 'content' value but stale attribute.type value. And since component/field names are same, it finds that name key in the 'content' and tries to render repeatable component(array) for updated content-type(String), causing the error.

Changes

Modified 'headers' inside useMemo hook to use updated list.layout value instead of using displayedHeaders which is stale on the first re-render.

Related Issue

Fixes #25230

How to test it

Create Content Type A with a repeatable component named testField.

Create Content Type B with a short text field named testField.

Add data to both.

Navigate to the List View of A.

Click directly on Content Type B in the sidebar.

Result: The page now renders correctly instead of throwing a white-screen TypeError.

Checklist

  1. My code follows the contribution guidelines.

  2. I have performed a self-review of my own code.

  3. I have linked the relevant issue.

  4. I have verified the fix locally.

@vercel
Copy link

vercel bot commented Jan 27, 2026

@jayesh70599 is attempting to deploy a commit to the Strapi Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot
Copy link

dosubot bot commented Jan 27, 2026

Related Documentation

Checked 1 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

@oiorain oiorain added source: core:content-manager Source is core/content-manager package community Changes and fixes created by community members labels Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Changes and fixes created by community members source: core:content-manager Source is core/content-manager package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Strapi dashboard crashes when switching between content types (in certain cases)

2 participants