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

'on-column-filter' event emitted for every column that has an initial 'filterValue' #445

Closed
1 task done
skray opened this issue Oct 26, 2018 · 3 comments
Closed
1 task done

Comments

@skray
Copy link

skray commented Oct 26, 2018

Issue Type (delete the irrelevant ones)

  • Bug

Specs

What version are you using?

Latest 2.15.3

What browser?

FF, Chrome

Expected Behavior

What did you expect to happen?

I expected the 'on-column-filter' even to be emitted once when the table loads, with all of the values from any initial column filterValues.

Actual Behavior

What actually happened?

'on-column-filter' is called once for each column that has an initial filterValue.

We are using the 'on-column-filter' event to trigger an API call to fetch data, so having the event triggered for every filterValue passed in to the column definition means our API is called once for each filterValue. I'm not sure how to discern when the 'on-column-filter' events are coming from the initial table creation filterValues, and when they are coming from user provided input, so I can't find a clear way to not call the API on certain triggers of 'on-column-filter'.

Steps to Reproduce the Problem

Please detail your steps here

  1. Create a table with multiple columns, and have filterValues in at least two column definitions
  2. Log the number of emitted 'on-column-filter' events

jsfiddle

https://jsfiddle.net/e5pncx0u/

2018-10-26 at 9 15 am

@skray skray changed the title 'on-column-filter 'on-column-filter' event emitted for every column that has an initial 'filterValue' Oct 26, 2018
@xaksis xaksis closed this as completed in fb8b109 Oct 29, 2018
@xaksis
Copy link
Owner

xaksis commented Oct 29, 2018

@skray thank you for detailed report on this bug. v2.16 should fix this for you.

@jcasale
Copy link

jcasale commented Dec 28, 2018

I am on 2.16.0 and this behaviour exists for me still. I also pass in a default filter on a column and both on-column-filter and on-per-page-change are called when the component mounts.

@SevymolSebastian
Copy link

I am using 2.16.0. But still this behaviour exists.

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

No branches or pull requests

4 participants