1. Mike Amy
  2. django-selectable

Commits

Mark Lavin  committed 14bda0e

Starting JS changes to handle the new response format.

  • Participants
  • Parent commits 97b3694
  • Branches result-refactor

Comments (0)

Files changed (1)

File selectable/static/selectable/js/jquery.dj.selectable.js

View file
  • Ignore whitespace
                 if (page) {
                     query.page = page;
                 }
-				$.getJSON(url, query, response);
+                function unwrapResponse(data) {
+                    var results = data.data;
+                    return response(results);
+                }   
+				$.getJSON(url, query, unwrapResponse);
             }
             // Create base auto-complete lookup
             $(input).autocomplete({