jrief / django-formset

The missing widgets and form manipulation library for Django
https://django-formset.fly.dev/
MIT License
317 stars 30 forks source link

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. #125

Closed amikphoto closed 1 week ago

amikphoto commented 5 months ago
          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 commented 5 months ago

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? :)

jrief commented 5 months ago

Is there a setup where I can reproduce this?

amikphoto commented 5 months ago

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.

jrief commented 5 months ago

This has been fixed now and will work in version 1.3.10

amikphoto commented 5 months ago

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

jrief commented 5 months ago

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