We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
What version are you using? 2.19.1
What browser? chrome 80
reset table filters and receive event filter-changed
the filters are reset but the event is not emitted TypeError: Cannot read property 'forEach' of undefined
https://jsfiddle.net/xdecow/5qLyhsfe/10/
In VgtFilterRow, the ref = "vgt-multiselect" is declared within an IF you need to check if the instance exists before using foreach (line 108)
current:
function reset(emitEvent = false) { this.columnFilters = {}; // Clear the selection in the multiselect this.$refs['vgt-multiselect'].forEach((ref) => { ref.clearSelection(); }); if (emitEvent) { this.$emit('filter-changed', this.columnFilters); } },
to:
function reset() { var emitEvent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; this.columnFilters = {}; // Clear the selection in the multiselect if ('vgt-multiselect' in this.$refs) { this.$refs['vgt-multiselect'].forEach(function (ref) { ref.clearSelection(); }); } if (emitEvent) { this.$emit('filter-changed', this.columnFilters); } },
The text was updated successfully, but these errors were encountered:
I can confirm this is the case as I also run into the same issue. My application does not even activated any select functions.
Edit: Was making a PR and realised it's fixed in master already.
Sorry, something went wrong.
I think this has been fixed. Will close once the new version is rolled out to npm.
715b78a
fixes xaksis#685
5073f81
TheJaredWilcurt
No branches or pull requests
Issue Type (delete the irrelevant ones)
Specs
What version are you using?
2.19.1
What browser?
chrome 80
Expected Behavior
reset table filters and receive event filter-changed
Actual Behavior
the filters are reset but the event is not emitted
TypeError: Cannot read property 'forEach' of undefined
Steps to Reproduce the Problem
jsfiddle
https://jsfiddle.net/xdecow/5qLyhsfe/10/
note
In VgtFilterRow, the ref = "vgt-multiselect" is declared within an IF
you need to check if the instance exists before using foreach (line 108)
current:
to:
The text was updated successfully, but these errors were encountered: