nova-issues icon indicating copy to clipboard operation
nova-issues copied to clipboard

Unable to hide fields in `Lens` page

Open rezuankassim opened this issue 5 years ago • 3 comments

  • Laravel Version: v8.70.2
  • Nova Version: v3.30.0
  • PHP Version: 8.0.12
  • Database Driver & Version: mysql - 8.0.27
  • Operating System and Version: macOS Monterey - 12.0.1
  • Browser type and version: Firefox - 94.0.1

Description:

Unable to hide any field using either hide() for Laravel\Nova\Fields\ID field or hideFromIndex() for Laravel\Nova\Fields\Text field in lens page.

Detailed steps to reproduce the issue on a fresh Nova installation:

  • Create lens page for resource
  • Hide Laravel\Nova\Fields\ID field using hide() or Laravel\Nova\Fields\Text field using hideFromIndex()
  • Field will still be showing in the lens page

Images:

Screenshot 2021-11-14 at 12 28 29 AM Screenshot 2021-11-14 at 12 29 16 AM

rezuankassim avatar Nov 13 '21 16:11 rezuankassim

There no form or detail page for Lens, it wouldn't be useful to have hideFromIndex() or readonly() for Lens context.

crynobone avatar Nov 14 '21 03:11 crynobone

@crynobone so is just better for me just don't register the field if I don't want to display in in the listing table?

rezuankassim avatar Nov 14 '21 07:11 rezuankassim

yes

crynobone avatar Nov 14 '21 08:11 crynobone