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

Uncaught ReferenceError: data is not defined at local.js:50 #303

Closed
asgraf opened this issue Dec 15, 2022 · 0 comments · Fixed by #304
Closed

Uncaught ReferenceError: data is not defined at local.js:50 #303

asgraf opened this issue Dec 15, 2022 · 0 comments · Fixed by #304

Comments

@asgraf
Copy link
Contributor

asgraf commented Dec 15, 2022

data: function (params) {
var query = {};
query[$ele.data('filter-field') || $ele.attr('name')] = params.term;
if ($ele.data('dependent-on') && $('#' + $ele.data('dependent-on')).val()) {
data[$ele.data('dependent-on-field')] = $('#' + $ele.data('dependent-on')).val();
}
return query;
},

When dependent-on and dependent-on-field values are set Uncaught ReferenceError: data is not defined is thrown at local.js:50

I assume this is a typo (data instead of query) and line 50

data[$ele.data('dependent-on-field')] = $('#' + $ele.data('dependent-on')).val();

should be changed to:

query[$ele.data('dependent-on-field')] = $('#' + $ele.data('dependent-on')).val(); 
asgraf added a commit to asgraf/crud-view that referenced this issue Dec 16, 2022
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

Successfully merging a pull request may close this issue.

1 participant