dmitrybubyakin / nova-medialibrary-field

Laravel Nova field for managing the Spatie media library
MIT License
262 stars 62 forks source link

Reuse of `->sortable()` creates broken sorting on index #142

Open sebsel opened 3 years ago

sebsel commented 3 years ago

According to the documentation, we can do ->sortable() on the field, to make the Media draggable / sortable while editing.

https://github.com/dmitrybubyakin/nova-medialibrary-field#sorting

By reusing this property, the Field is marked as sortable, thus Laravel Nova will render arrows on the index page.

image-9

Clicking on one of those will give an error, because the column product_images does not exists in my database (nor does it have to).

Maybe it's better to not reuse this standard Nova property? Nova has no wrapper-function around it, so you can't really disable these arrows.

dmitrybubyakin commented 3 years ago

@sebsel Hi. Yes, going to rename this. Thanks.