hideFromIndex still executed on index view #3439
-
Description:I have this code in a Resource: // Price on index page
Currency::make('Price')
->sortable()
->currency('EUR')
->onlyOnIndex(),
// Price detail page
Currency::make('Price')
->rules('required', 'numeric', 'nullable')
->nullValues(['', 'null', null])
->currency('EUR')
->help(view('nova.product.price', ['price_info' => $this->getPriceInfo()])->render())
->hideFromIndex(),The problem is that the second 'Price' seems to be executed on the index page while it has I found out because Is there a way to make sure that this is only executed on the detail and edit views? Please let me know if you need additional information. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Yes, that is an expected behavior, all However, you may configure different |
Beta Was this translation helpful? Give feedback.
Yes, that is an expected behavior, all
fieldsneed to pull into a collection and then only filter based on display/hidden for each view type.However, you may configure different
fieldForIndex()andfieldForDetail()to explicitly change this behavior.