Skip to content

The field being named with the field name means we should be doing an… #2

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

Merged
merged 1 commit into from
Apr 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ function handle_querystring_and_redirect(querystring_value, qs_target_value, sel
django.jQuery(document).ready(function(){
django.jQuery(".ajax-autocomplete-select-widget-wrapper select").on('select2:unselect', function(e){
var qs_target_value = django.jQuery(this).parent().data("qs-target-value");
var querystring_value = django.jQuery(this).closest("form").find('input[name="querystring_value"]').val();
var querystring_value = django.jQuery(this).closest("form").find('input[name="$querystring_value"]').val();
handle_querystring_and_redirect(querystring_value, qs_target_value, "");
});

django.jQuery(".ajax-autocomplete-select-widget-wrapper select").on('change', function(e, choice){
var selection = django.jQuery(e.target).val() || "";
var qs_target_value = django.jQuery(this).parent().data("qs-target-value");
var querystring_value = django.jQuery(this).closest("form").find('input[name="querystring_value"]').val();
var querystring_value = django.jQuery(this).closest("form").find('input[name="$querystring_value"]').val();
if(selection.length > 0){
handle_querystring_and_redirect(querystring_value, qs_target_value, selection);
}
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name='django-admin-autocomplete-list-filter',
version='0.1.5',
version='0.1.5.1',
description='Ajax autocomplete list filter for Django admin',
long_description=README,
long_description_content_type='text/markdown',
Expand Down