saade / filament-adjacency-list

A Filament package to manage adjacency lists (aka trees).
https://filamentphp.com/plugins/saade-adjacency-list
MIT License
74 stars 13 forks source link

[Bug]: Cannot Reorder, Undefined array key "children" #16

Closed ufukseyithan closed 7 months ago

ufukseyithan commented 11 months ago

What happened?

I cannot reorder my items in the list, or make an item a subitem. I can create a child perfectly fine though.

The data in the database is this: {"f692b5e5-2cc9-41ad-9b5a-79ea86d1f0b4":{"label":"lol","children":[],"url":null},"4a463f2d-e261-4fb7-bb1b-f130c9cdea64":{"label":"lol2","children":[],"url":null}}

I am using this form on a settings page (package)

How to reproduce the bug

No idea to be honest. It might be because i am doing it in a settings page.

Package Version

3.1.0

PHP Version

8.1

Laravel Version

10

Which operating systems does with happen with?

Windows

Notes

No response

saade commented 10 months ago

Hey @ufukseyithan, sorry to hear that,

I cannot reproduce this in my current repo, could you please provide a reproduction repository so i can test and debug? Thanks

ufukseyithan commented 10 months ago

So I just tested it on a normal resource form in the same project and it works perfectly fine. There is some problem with a "settings" page created with the package I gave a link to in the OP. Would you please be able to test it on that specific package, creating a settings page and putting a adjacency list field to the form?