Dropdown remote getting type error: e is null
See original GitHub issueHelp Wanted
Problem
I am trying to get populate a dropdown with remote data using the api, but no matter what I try, the console always shows: TypeError: e is null
My backend is Django. I’ve tried returning what Django returns doing a ‘.all()’ query and fixing the response in an onResponse call in my js, but this didn’t work. I’ve also tried creating the correct format in Django and returning JSON of the correct form (according to this) but I get the same error. An example of the response from my server is:
{
"success": true,
"results": [
{
"name": "Adafruit",
"value": 1
},
{
"name": "SparkFun",
"value": 2
}
]
}
And here is the relevant javascript:
$('#manufacturer').dropdown({
apiSettings: {
debug: true,
cache: false,
action: 'get manufacturer list',
},
});
The debug output shows all the steps are completing succesfully:
... Changing setting ...
... Looking up url for action ...
... Querying URL ...
... Throttling request ...
... Sending throttled request ...
... Checking JSON returned success ...
... Response passed success test ...
... Successful API Response ...
With the final step showing my response in the correct form.
The exact error message is:
TypeError: e is null[Learn More] semantic.min.js:11:86696
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
jQuery Draggable with Bootstrap Tooltip TypeError
I have a draggable element (see the code snippet and click on picture to add pins) which shows a tooltip on mouseover and...
Read more >Methods | Select2 - The jQuery replacement for select boxes
Methods · Opening the dropdown · Closing the dropdown · Checking if the plugin is initialized · Destroying the Select2 control · Examples....
Read more >JavaScript Drop Down Box Configuration - DevExtreme
Specifies whether the UI component allows a user to enter a custom value. Type: Boolean. Default Value: false. accessKey.
Read more >Error Responses - Amazon Simple Storage Service
Lists and describes the Amazon S3 error responses and their associated HTTP status codes.
Read more >Uncaught TypeError: e is null - error when saving edit event ...
Uncaught TypeError: e is null - error when saving edit event Completed · Edit an event with the following conditions. start & end...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@cafeclimber Then my guess with the empty
select
was correct 😄It was! Lol thanks for the help and the PR.