Skip to content

[6.x] Keep listing columns when the response doesn't include any - #15801

Merged
jasonvarga merged 1 commit into
6.xfrom
listing-missing-columns
Nov 9, 2026
Merged

jasonvarga merged 1 commit into
6.xfrom
listing-missing-columns

Conversation

@duncanmcclean

Copy link
Copy Markdown
Member

This pull request fixes an issue where clicking a column header on a custom listing would throw TypeError: can't access property "filter", columns.value is undefined.

This was happening because the Listing component replaces its columns with meta.columns from every response. Core resources always return them, but custom JSON endpoints (eg. a resource collection in an addon) don't have to. When they're missing, the columns become undefined and anything reading them, like sorting, blows up.

This PR fixes it by only replacing the columns when the response actually includes them, otherwise the listing keeps the columns it was given as a prop.

@jasonvarga
jasonvarga merged commit cabb7a3 into 6.x Nov 9, 2026
65 checks passed
@jasonvarga
jasonvarga deleted the listing-missing-columns branch November 9, 2026 18:46
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.

3 participants