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

Why is the @on-column-filter event only emitted in remote mode? #860

Open
2 of 3 tasks
christophfriedrich opened this issue May 30, 2021 · 1 comment · May be fixed by #887
Open
2 of 3 tasks

Why is the @on-column-filter event only emitted in remote mode? #860

christophfriedrich opened this issue May 30, 2021 · 1 comment · May be fixed by #887

Comments

@christophfriedrich
Copy link

Issue Type

  • Bug
  • Enhancement Request
  • Question

Specs

What version are you using?
2.21.10

What browser?
Firefox

Question/Enhancement Request

The event @on-column-filter is the only one that is only emitted for server-side tables. As the docs say:

event emitted when column is filtered (only emitted for remote mode)

Why is that so? It would be nice to have this information always available, also when not in remote mode. I believe I'm not the only one with this need, see e.g. #778. In my case I want to filter items on a map synchronously with the filters set in the table.

Thank you for any information! :)

@christophfriedrich
Copy link
Author

I searched through the code and couldn't find the part of code responsible for only emitting in remote mode, because the emit() call looks like this:

if (fromFilter) {
this.$emit('on-column-filter', {
columnFilters: this.columnFilters,
});
}

(the fromFilter parameter has nothing to do with remote mode or not, the previous if in line 1339 neither and there's also no earlier return or similar)

So I just tried it and discovered it IS indeed always emitted! 👍

Therefore I'll rephrase my issue to "fix the documentation accordingly please" :)

@mp3000mp mp3000mp linked a pull request Oct 1, 2021 that will close this issue
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