Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@duncanmcclean
Copy link
Member

@duncanmcclean duncanmcclean commented Nov 25, 2025

This pull request aims to bring back the "Collection" and "Taxonomy" columns in the relationship selector.

In v5, the type column was hardcoded into the Listing component and only knew how to deal with collection and taxonomy arrays.

This PR brings it back as a "real" column called type, with a customised cell slot in the relationship selector listing. Maybe we should call it something else to avoid possible conflicts in addons? 🤔


Note

Brings back a proper type column (Collection/Taxonomy) in relationship selector listings with UI badge rendering and server-side column definitions.

  • Frontend (Relationship Selector)
    • Add #cell-type slot rendering a Badge for the type column in resources/js/components/inputs/relationship/Selector.vue.
    • Pass isColumnVisible to table cell slots; import/register Badge.
  • Backend (CP Resources)
    • Make setColumns methods protected to allow overrides in Entries and Terms.
    • Define a new listable, sortable type column in EntriesFieldtypeEntries (label: “Collection”) and TermsFieldtypeTerms (label: “Taxonomy”).
    • Map type values in ListedEntry and ListedTerm to the entry’s collection title or term’s taxonomy title.
    • Remove hardcoded taxonomy column from Terms (superseded by type).

Written by Cursor Bugbot for commit f311fe7. This will update automatically on new commits. Configure here.

@jackmcdade
Copy link
Member

Where can I test this out? I can't think of how to see Entries and Terms in the same listing 🤔

@duncanmcclean
Copy link
Member Author

Where can I test this out? I can't think of how to see Entries and Terms in the same listing 🤔

  1. Create an entries/terms field, using stack selector mode. Don't limit it to a certain collection/taxonomy.
  2. You'll see new "Collection" / "Taxonomy" columns when you open the listing stacks.

@jasonvarga jasonvarga merged commit 75a0396 into master Dec 11, 2025
11 checks passed
@jasonvarga jasonvarga deleted the listing-type-column branch December 11, 2025 20:30
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.

4 participants