Closed vabene1111 closed 1 year ago
This should be fixed in version 1.0.
Please try this example: https://django-formset.fly.dev/dual-selector/#sortable-dual-selector-widget
thank you very much. I have in the meantime switched to another solution (not because of this bug but something else) so I cannot really test this anymore, but I will keep this awesome library in my mind for upcoming projects, its something I have always wanted for django and am really happy to know it exists.
I have in the meantime switched to another solution
may I ask to which one?
i just used my usual vue frontend framework which is not really a framework but just some cobbled together input elements, so not really an alternative solution but a DIY approach
@jrief please reopen this issue. This appears to be an issue in version 1.5.
Saving writes the correct entries to the through table, however when reloading, the right hand side displays all available items, not those selected, and not in the correct order.
Every left hand side instance displays the same right hand instances in the same order, irrespective of whether they have been added.
Let me know if you would like the models, sql and output showing the correct database entries and screenshots showing the incorrect selected items.
@jamiecash please open a new issue and provide some code on how to reproduce this. Try to modify the specific example in testapp/
and fork this project.
Versions Django==4.2.1 django-formset==0.13.4
Description I have a django app that has a form that contains a DualSortableSelector widget according to the docs https://django-formset.readthedocs.io/en/latest/dual-selector.html#
The form can be opened, the categories can be assigned to the store and can be ordered and saved. The weight attribute is set in the db correctly according to the order that is choosen in the user interface.
The problem is when i re-open the form the
DualSortableSelector
widget loads the categories based on their ID order and not ordered by weight so that when I save the form again the order is lost.Steps to reproduce
Note What is interesting is that other than on the screenshots in the docs when i click on an entry in the right table its not highlighted as a selected entry (but i can still sort it)
Thanks for this awesome library btw. its something I have always wanted and seems incredibly powerful and thank you in advance for any help.