Skip to content
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

Problems with django-smart-select #168

Open
thejpanganiban opened this issue Jul 24, 2024 · 0 comments
Open

Problems with django-smart-select #168

thejpanganiban opened this issue Jul 24, 2024 · 0 comments

Comments

@thejpanganiban
Copy link

Additional class=chained-fk and data-* attributes from the widget ChainedSelect (https://github.com/jazzband/django-smart-selects/blob/master/smart_selects/widgets.py#L54) does not render. They're needed attributes so bindfields.js would work properly.

Tried @Thutmose3's branch (#163) as well, with no luck.


Here's what I understand so far:

  1. ChainedSelect widget generates attributes (class=chained-fk, and some data-attributes) that's later picked-up by the jQuery functions of django-smart-select.
  2. Widget attributes for some reason does not render in the template when using django-crispy-forms + tailwind.
  3. Found out that attributes are generated differently on <select>: field|build_attrs vs {% include "tailwind/layout/attrs.html" ... %}.
  4. Replaced tailwind/layout/select.html so that it uses Django's original template (plus some modifications so that variables match), and additional attributes are still not rendering.

Where could the attributes from ChainedSelect have gone?

cc: @RJAA-25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant