-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make list items sortable #4
Comments
I've added a |
Ok, |
c914c2b should fix |
6969d6d should fix This works as long as there isn't any weird fields in the array! In my tests this works for swapping arrays of objects with selects and simple text inputs, but doesn't work with material time and date inputs. Needs more work. |
208d2dd Fixes everything, |
@jankapunkt items can be swapped like this now:
This will make it a lot easier to provide [ ⬆️ ] and [ ⬇️ ] buttons. More fancy stuff are also possible now:
|
Do you think it makes sense then to let extensions implement this? I think it is now flexible enough to let developers imement their own version of up / down / sort. Wdyt? |
Sorry forget my previous comment, extensions can override it anyway so out-of-the-box up/down would still make most sense IMO. |
up/down in templates? or as an API method that extensions can use to implement the functionality? |
Hi. I think it makes sense to provide up down buttons out-of-the box in the default array template, don't you think? The API methods would still be required for this and then extensions could either ignore it or use it to implement e.g. drag and drop etc. I can work towards a PR if you wan. |
In the default bootstrap and plain templates? |
@jankapunkt I redid the |
I currently use a custom extension to make list entries sortable. However, I think it should not be that big issue to provide some [ ⬆️ ] and [ ⬇️ ] buttons to make list items sortable by incrementing / decrementing indices. This solution could also be implemented without any third party lib.
The text was updated successfully, but these errors were encountered: