Closed caseydwyer closed 10 months ago
It's late here so I may be misunderstanding but if you set listable:hidden
on a field in a collection blueprint, does it show up in the "column picker"?
If it doesn't, then why would it be different here?
Yeah, sorryβI did a lousy job of explaining that. Also should have just shown the entire function call; that line is within a rejects
closure, so it's kind of like a double-negative. Updating the original codeblock with that context. π The way it's written (if I understand it correctly) says "reject the field if any of the following do apply:"
listable
is set & hidden
listable
is set & false
That second one is where the problem lies; it excludes any hidden
fields from being listable. So prior to this PR, those fields don't show up in the column picker, under Available Columns
βthey're just missing altogether. After this PR, they're now made available (but not selected by default).
Yeah, I was misunderstanding, thanks!
Released as part of v5.6.1.
Description
Currently, if you mark a field as
hidden
, the second qualifier in thelistableColumns
method ofResource.php
(noted below) causes it to be rejected. That is, it does not show up in the "column picker" of the control panel's index view:PR in 2 minutes. π
Steps to reproduce
listable: hidden
on the fieldEnvironment
Environment
Application Name: TF Laravel Version: 10.39.0 PHP Version: 8.2.5 Composer Version: 2.5.4 Environment: local Debug Mode: ENABLED URL: tf.test Maintenance Mode: OFF Cache Config: NOT CACHED Events: NOT CACHED Routes: NOT CACHED Views: CACHED Drivers Broadcasting: log Cache: statamic Database: mysql Logs: stack / single Mail: smtp Queue: sync Session: file Livewire Livewire: v3.3.5 Statamic Addons: 6 Antlers: runtime Stache Watcher: Enabled Static Caching: Disabled Version: 4.42.1 PRO Statamic Addons doublethreedigital/runway: 5.6.0 ... Statamic Eloquent Driver Asset Containers: file Assets: file Blueprints: file Collection Trees: file Collections: file Entries: eloquent Forms: file Global Sets: file Global Variables: file Navigation Trees: file Navigations: file Revisions: eloquent Taxonomies: file Terms: file