mikebronner / nova-prepopulate-searchable

A tool to allow BelongsTo searchable fields to be pre-populated with data
MIT License
37 stars 21 forks source link

Preselecting An Item Renders The List Empty #7

Open mikebronner opened 5 years ago

mikebronner commented 5 years ago

If you pre-select an item, like so:

                ->withMeta([
                    "belongsToId" => $this->user->id
                        ?: auth()->user()->id,
                ])

Then the list only renders the selected item, and not all possible selections.

alexbowers commented 5 years ago

Unfortunately, that is a side effect of how the underlying element works, it could be overridden but I wanted to keep the code as close as possible to the core Nova component.

I would accept a PR that fixes this issue however.

mikebronner commented 5 years ago

@alexbowers Cool, I'll see if I can't put something together. Thanks