File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -64,12 +64,9 @@ public function fields(NovaRequest $request)
6464 ->min(0.01)
6565 ->max(1)
6666 ->step(0.01)
67- ->hideFromIndex()
68- ->hideFromDetail(),
67+ ->onlyOnForms(),
6968
7069 FieldProgressbar::make(__('Score'), 'score')
71- ->hideWhenUpdating()
72- ->hideWhenCreating()
7370 ->sortable(),
7471 ];
7572}
Original file line number Diff line number Diff line change 66
77class FieldProgressbar extends Field
88{
9+ /**
10+ * Indicates if the element should be shown on the update view.
11+ *
12+ * @var (callable(\Laravel\Nova\Http\Requests\NovaRequest, mixed):bool)|bool
13+ */
14+ public $ showOnUpdate = false ;
15+
16+ /**
17+ * Indicates if the element should be shown on the creation view.
18+ *
19+ * @var (callable(\Laravel\Nova\Http\Requests\NovaRequest):bool)|bool
20+ */
21+ public $ showOnCreation = true ;
22+
923 /**
1024 * The field's component.
1125 *
You can’t perform that action at this time.
0 commit comments