You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Create a table with multiple columns, and have filterValues in at least two column definitions
Log the number of emitted 'on-column-filter' events
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.
Issue Type (delete the irrelevant ones)
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
jsfiddle
https://jsfiddle.net/e5pncx0u/
The text was updated successfully, but these errors were encountered: