django-formset icon indicating copy to clipboard operation
django-formset copied to clipboard

Still have the problem with new release 1.3.9. It happened when I use selectize widget and when I use active search in the widget and it tries to get answer from backend to get new list of options.

Open amikphoto opened this issue 1 year ago • 6 comments

          Still have the problem with new release 1.3.9. It happened when I use selectize widget and when I use active search in the widget and it tries to get answer from backend to get new list of options. 

The problem appears in:

class FormCollection(BaseFormCollection, metaclass=FormCollectionMeta): """ Base class for a collection of forms. Attributes of this class which inherit from django.forms.forms.BaseForm are managed by this class. """ def get_field(self, field_path): path = field_path.split('.', 1) key, path = path return self.declared_holders[key].get_field(path)

image

self.declared_holders[key].get_field(path) return KeyError:'0'

Originally posted by @amikphoto in https://github.com/jrief/django-formset/issues/122#issuecomment-2027969408

amikphoto avatar Mar 30 '24 13:03 amikphoto

I'm sorry to disturb you, but could you tell me is there a problem with selectize widget when we are using it in form collections or it's only my problem? :)

amikphoto avatar Apr 05 '24 13:04 amikphoto

Is there a setup where I can reproduce this?

jrief avatar Apr 05 '24 14:04 jrief

you could add selectize widget to your test application in any form collection. For best expirience you should set max_prefetch_choices to 2 (from 250). It helps to find problem with working with backend.

amikphoto avatar Apr 05 '24 18:04 amikphoto

This has been fixed now and will work in version 1.3.10

jrief avatar Apr 05 '24 21:04 jrief

Thank you very much! Yes, the problem is solved. Going to see next one :)

amikphoto avatar Apr 06 '24 17:04 amikphoto

Thanks for reporting. Understanding other's use-cases help me to improve the stability of the project.

jrief avatar Apr 07 '24 06:04 jrief