laravel / laravel/nova-issues

nullable and searchable `MorphTo` displays 2nd input

Open
#6,934 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
557
Forks
33
PR merge metrics
No merged PRs in 30d

Description

- Laravel Version: 12.35.0
- Nova Version: v5.7.6

### Description:

`MorphTo` nullable field when it's `searchable` has 2nd input in the accessible state, even if them `null` option is chosen, than may confuse users:

Image

```php

MorphTo::make('External Content Provider', 'externalContentProvider')
->types([
Article::class,
])
->withSubtitles()
->default(null)
->nullable()
->searchable()
->hideFromIndex()
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the shown nullable, searchable MorphTo configuration in Laravel Nova and inspect how the field renders after the null option is selected. Done means the second input is no longer accessible or displayed when the MorphTo value is null, without disrupting searchable non-null selections.

Written by the indexing model from the issue text.

Assessment

Tech stack
laravel, php
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.