Naxon / nova-field-sortable

Adds sorting functionality to the Laravel Nova's index resource
MIT License
60 stars 23 forks source link

Update prevented by sortable issue #16

Closed dillingham closed 5 years ago

dillingham commented 5 years ago

nova 1.2.1 / latest chrome

When I try to update a resource with this field I get the following in the console Seems like its checking validation

weird-issue

FaridAghili commented 5 years ago

Same here

jakobfdev commented 5 years ago

I can see it too. You need to hide the field in detail (maybe not necessary) and form. Only use it on index.

As far as I can see, this should be default behaviour, since the ordering should not happen on single instance editing. At least that's what the underlying eloquent trait suggests.

Just add onlyOnIndex() to your field definition.

@Naxon if you agree, can you make the field actually do nothing in a form, or at least prevent the nova error, since it crashes the update functionality and these kind of bugs clutter up the nova issue repo.

Thanks for the field btw, works smoothly.

dillingham commented 5 years ago

PR submitted that fixes it https://github.com/Naxon/nova-field-sortable/pull/17

jakobfdev commented 5 years ago

That's pretty straightforward. Alright