jazzband / django-smart-selects

chained and grouped selects for django forms
https://django-smart-selects.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.1k stars 348 forks source link

enable dropdown selection and changes trigger #260

Closed openrijal closed 3 years ago

openrijal commented 6 years ago

use browser's capabilities to trigger changes

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 89.809% when pulling 8e634fa105cae491468ab34cf3993b49be9c422b on crackjack:patch-2 into 1ceafd8ff63e5888d5c0bcb9ff6f5d4e03769fcf on digi604:js-unlinting-fixes.

emilyzzz commented 4 years ago

I have a double ChainedForeignKey fields, and on update on Django admin, the grand child model doesn't render value (looks like unselected). Manually updated code according to this PR fixed the issue. Hope this PR can be merged soon.

roszczypalam commented 4 years ago

@manelclos @blag Is there any chance to merge it ? It solves problem with chained dropdowns in Admin edit views.

skarzi commented 3 years ago

is there any chance to merge this PR and release new version?

manelclos commented 3 years ago

This PR is against js-unlinting-fixes branch which hasn't been updated in two years, and probably not merged because of problems on that branch. Releases are based off master. Could you try current master and see if the fix still applies?

manelclos commented 3 years ago

As I suspected, applying this change on master breaks the location example in the test_app: the third select is no longer updated and you are left in an inconsistent state.

Please take into account that when updating a form control using javascript no change signal is generated, and current version of django-smart-selects seems to rely on manually emitting the signal.

Hope this helps.

manelclos commented 3 years ago

If anyone using the old js-unlinting-fixes tries to update to current master has any problems, I would be happy to help. We can document the process if any special change is needed.

manelclos commented 3 years ago

closing due to inactivity, please reopen if necessary.